Added TimeRange class, trying to work out duplication