Changed script structure

Changed script structure  to more readable and efficient code.
I deleted all deprecated thing i.e chunks function.
Added grid_check (check if grid if valid), grid_solve(check is sudoku
already solved or not)