#2: Implemented undo/redo for connect/disconnect.