move all map stuff to map lua file