Added use of c++ smart pointers; Added versioning; Changed team swap to be queued until death