Refactor emitter callback.