Added TypeMap to assist in typechecking