Refactor ad-hoc url parsing to use the new urlArg() method