Implements PreferenceWindow. Fixes #29