Refactor _EventInternalMetadata object to improve type safety.