Search refactored