major code revision for map code generation
added testmap and baseunit