Clean up map.js file. Add comments. Some of them helpful.