Refinements 2

- Moved TypeEnvironment to typechecking package.
- Explicit dependencies.
- Some renaming.