JSLint. Made event emitter work