Merged AGM_MapTools with AGM_Map. Various fixes.