Switching to heapq for event_list