Typing environment rewritten.