Use classes as event types instead of strings