Refactored config class