Work in progress.
Add acceptance tests.
Fix for sync.