Refactoring mapas.coffeescript.js, move some behavior of map to maps.coffeescript.js