Refactoring to provide unique search thread