Refactored the url parser

Refactored the switch of providers in the url parser into a function for
each provider. Also added the create url function to the parser.