Made some map.js changes