Event emitter with hierarchy