refactoring around editing involving CDS

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
make replaceTranscripts atomic

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
1-level undo/redo prototype

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>