Improvements on geocoding code