Refactor environment module.
Refactor expression module.