Small improvements to sync API.