Add sync support (closes #189)