Refactoring of code to move parsing of urls to providers.