Finished the type checker