cleaned up some js code for google maps