Refactoring config structure