Refractor alla synch connection code
Merge heads