Refactored UrlRewriter using UriBuilder