cleaned up UnloadAll and added tests