start to refactoring
modified GtTypeEnv