I know this isn't part of the diff, but in general I really think we should prefer named events over giant `switch` statements.