Removed some comments and a function

removed the function to create index file
removed some comments
Removed unused variables