Refactor view for displaying different types of searches