More logic added to the index file.