Search refactor.