Add support for undoing edits