Add newQuery()

It simplifies getting queries for both internal and external use.