Integrated with event aggrigator and refactored