Constants added and improved checkForWinner