Instead of relying on confusing structures, raw data and direct access to components, add a wrapper for events.