added max_event_display for keeping memory down
added limit of 25 displayed events at a time to limit memory consumption