Use classes instead of a complicated nested hash for search results