Previously this used a very hacky way to push and pop events on the event stack. This especially caused issues since it disabled and enabled interrupts, and these routines are called in an interrupt handler, which breaks things in some cases :p
I should've made a git repo for this much sooner, oops :p