Added some comments and fixed whitespace.
Moved some functions and reduced their scope.
Changed README.md to reflect that there is now an AI.