Finished the typechecker