great thanks, could you also add some comments on what's supposed to happen and what these sync-things are  supposed to do?

I then need to leave so I'll ask someone else to finish the review, sorry for that but I'd better not have this PR wait for days.