Further work on setting up the sync functions