JK: Moving all syncing code into native code, outside of javascript land.