clean up the index