Transform struct event into safer and more convenient Event.

Going to file this under #802 because the code changes are closely related, but this change wasn't strictly necessary to finish #802.  Mostly mechanical refactoring.