1. refactor
2. add auto sync mode
Merge branch 'refactor'