cleaned up js for images on map