Moved code for adding and removing players to methods.  Removed unnecessary SetUserData calls.
Moved some code to methods.  Made nextTeam more clear.  Added checks when adding or removing cursor joint.
Use built-in method to convert duration to float.