Added undo/redo for nodes addition