Added code for geolocation and localstorage