Added events and messagebox