Environment definition refactoring