Merge in clone and sync changes. Fix a bug in undelta.