change parameters to be more readable
rearrange parameters for the ToUrl function and updated readme.
refactor to use switches rather than cludgy if/elseif