Removes duplicate code

Encapsulates search result checking in verifyResults function which
renders the "no results" page and search suggestions