Refactor geocoder