Refactoring the search runner to simplify its function.
BugzId: 3170