Refactored settings class.