sync-engine-shared - Various fixes and clean up