Fixes #313 --- the Query API is fully updated.