Refactor geolocate control