Refactored config manager