Cleaning up event switch.