clean up the query/query_reader interfaces