Partially refactor the Searches controller