Integrated the query manager