Updated to do initial sync in both directions