tictactoe back end refactored somewhat and comments cleaned up