Refactoring configuration class