refactored settings module