Cleanup, add missing events block
Use EventEmitterTrait instead of base class
Merge branch 'feature/cleanup'