Impl Undo/Redo. close #337