Reorganised imports to fix build on windows.
Changed events from structs to classes.