Preferences dialog

This is a minimal version of the preferences dialog.