moved all map stuff to map.js