Allow passing unload reason to destory.
Write more tests.