Refactored sync client into its own class.
Merge branch 'master' into tests
Small fix.
Fix client importing.
Merge branch 'master' into tests