Basic event handling is implemented.