Refactoring to pass the URL to the URLBuilder