Starting to rip apart map.js