- further work on integrating the settings dialog into the UI.
- fix crash when running the settings dialog for a second time.