add special-case compare for date ranges
improve range queries, removal of docs and more tests