Some optimizations to Sudoku 2d array