Implemented DLL unload and thread deinit