Removed assignment of window.location to variable. Updated variable references to use window.location