move stuff from index.js to settings-dialog.js