Refactoring config