Improved the CustomEventPrintListener which now has a separate method to process each event.