Added destroy function, with confirmation dialog box