Updates to query engine