How to add and delete rows and columns, undo and redo