Start migrating and refactoring Preference Dialog.
PrefDialog is  special it seems, this should be working.
More progress on PrefDialog.