Reworked code.

Refactored code, removed global variables, and created game, x, and o
objects.