Move complete environment handling from Lambda to TypeChecker