Relocate max_height() function

Moved from map.js to app.js
Map Build Level 1