added tests for undo/redo, some fixes. TODO: bounds for nodes array in undo/redo, the same for vector