Change and update PreferenceDialog.
It's now responsible for adding and update preferences.
Cosmetics