refactoring handling of event classes to separate module

- event objects now always get set with a unique, defined ID at
  initialization