Refactored the actual geocoding code