Geomap: Code cleanup and optimization including removing instances of $.each