Refactored some of the functions inside the multithreaded geocoder