Setup sync code