Heavily rewritten the code to make it work better with updating geolocation.