Normal search and hierarchical search needs slightly different set of files. Refactored code in such a way that the elements in both these lists are references of a elements in a list of all files and hence reducing the memory needed for search and hierarchical search combined. Files used for hierarchical search contain only uploaded files now, rather than mix of uploaded and un-uploaded, reducing iterations required for hierarchical search