Fixed type aliases and simplified TDefEnv.