Maptool added and many cleanups