extended typechecker with multimap
Added message to TBad and similar types
more work