updating queryForm() and adding new compactSearch() helper method