Refactored settings manager