Remove MessageEvents from code.