Refactored Url class