Added event handling and actions.