Refactored generation of EventQueue::$priorities out to a separate method