mostly fixed map analyzer. There is still a visualization bug.