Event handling, message sending.