Refactored settings system.