Update location-script.js

Updated functions, clarified comments, moved helpers from searchGetLocation() into their own function