Changed service layer to implement EventEmitter