core: config refactoring