reorganize things, start work on sync.js