Fixed minor generateMap bug, added printMap. No optimization, in GCC we trust