Introduce specialized Event subclasses.
Fix code style, minor improvements.