Refactor search to use existing scope