Add event handling.