Added deletedFlag ability to destroy function to set a flag rather than destroying