Implemented undo in Reindex Command so both left and right indexing can be undone