Removing dead code and some cleanup on the main and geolocation files