Refactored TypeEnvironment
Automatic code refactoring