Tic Tac Toe refactoring