Refactoring AdminQueryHelper, to make it less depend on the @query_result