Added Secondary Sort and Inverted Index