Fix jshint issues
Wrap exported object into EventEmitter and raise all important events