Refactor envcontrollers.
Refactor outputs.