Refactored Type Checker to be a collection of functions rather than a class.