Simplify QueryEngine API

Part of #35