Added grouping events by time (dependent on other people's work for actual testing)
merged with master.