Refactor/env