added comments to map.js and cleaned up indentations