Allow range queries

Partly addresses #19