Cleaning of the typechecker