Added things for new query system