Refactor map.js
Minor change
Refactoring