Improved accuracy of queries

This is done using a different way of searching for results- overlap now
returns a TimeRange and sessions are now stored as TimeRanges.