Cleaned up. No longer distinguishing between onset, trigger and events, because there is never any iftesting (beyond initially) whether an event should be executed or not.