james | refactoring environment-related things