Delete unnecessary row and cols.