Cleanup event generics

Same as #25, but now as a pull request against `master`. Refer to the #25 for details.