Refs #14341 daviz; cleanup code in events.py