Refactoring and add function to return QueryResults as List<Result>