Map improvements

Notice I also did some minor changes to fix bugs in models/db.py and controllers/dataadmin.py