refactor sync_to into a worker class, in preparation for sync_algorithm invoking commands to send