Refactored out the browser and url variable