js cleanup & geolocation