Fixed a problem in BoneStateTest.  All tests pass now.
Did code analysis and tidied up.  No bugs found.
Fixed possible initialisation bug with AIPlayer.