More progress on the new query engine