Changed the UndoImplementation slightly.