Code refactoring for geolocalization