Refactoring geolocator a little bit