Some changes in discreteSquareBySquare.