cleanup of internal mr data structure