changes to events and header recording, due to the use of the  PajeDefinitions .
main example small fix