Update priority and sorting for events