Refactoring and added initial UrlCache