further refactoring of wavefront event processing