Added destroy function.