Refactor search for browse