Adds URL refactoring to remove duplication.