Removed unnecessary indexing.
Changed output of file_search from list to generator.