Just moved the destroy function.