Tried to add undo/redo, but haven't got it to work yet.