refactor environment config loading/structure