Refactor UrlValidator