Refactor the Searches controller