Added support other EventEmitter objects. Refactoring.