added comments to map.js