refactoring: simplify settings code