Refactoring config class