Cleaning up the events