Revert "Pull out pending_events changes and reuse"

This reverts commit e832a3a17f3bc1a896765a30e7fa360bfd4935de.