complete config refactoring