Refactoring config helper