Separate parseUrl into its own module.