Use struct event instead of raw encoded events in the replayer.

#802