Auto-save on every edit on a separate thread.

Removed unused dialog adapter.

Added and improved unit testing.