cleaned up InvertedIndex