Made some tweaks to the way map.js works and renamed it to mapinput.js.