Moved most of the map rendering logic to Map-class + some other minor fixes.