Added destructors for cleaner exiting