removed un-needed passing around of the index files