Refactor and improve readability in SudokuGrid