cleaned up some comments
cleaned up code
fixed error in can-win detecting function