Implement first version of synchronization algorithm. It's not very advanced yet, but looks promising.