Synchronization phase
Merge pull request #40 from EasonLiao/sync_new

Implement phase 2: state synchronization