Refactored some controller and service code according to event emitter