Moved maps js code from application.js to maps.js