Rewrote type checker to utilize object algebras.

TypeCheck function takes a TypeCheckData object to share information between items.