Global refactor sudoku.js