core and lib: methods now return QueryResult and List<QueryResult> instead of QueryResponse objects