Group events into levels.