Implement QueryModel and QueryCollection

Resolves #198.