Update Sync script to use onReady queue and single DOM ready hook.