Added computer AI.
Added some comments and fixed whitespace.