moar settings.js refactoring