Got InvertedIndex.java to compile, still has type cast issues