Undo redo additions

Undo/redo now working for new diagram
Fixed a undo-action-undo bug