Refactor env handling.