Re-organise the code somewhat.
Re-organise the code.
Implement range queries.