Basic test and refactoring
Refactor to suppress the global event emitter