Moves geolocation to another method, to clean up the code