Almost finished the type checker