Refactoring UrlService