Sorting out the events to persist