remove useless event-driven clauses