Indexing/Search refactoring