Updated typechecker