Refactor: remove loop through returned objects, pass them into $.tmpl method