Cleaning up the index file