Broke event_c into dedicated module.
Overloaded casts to correctly handle shared_ptr.
Propagated new casts.