New tests and changes in query API (where and range deprecated in favour of jsQuery and inRange)