Code cleanup maps.js