Add applyEdit and getVersionedDoc helpers