refactored maps into maps.js