Improve implementation of geolocation protocol