Added unit.js to the project and made some changes to map.js.