Issue #151. Added missing classes + improvements of code gen.
Issue #119. Implemented emit() and listen() methods instead of set of EventDispatcher's methods.