Added in the query-rest stuff.