Added support for event class inheritance.
Added test for event inheritance.