Added safety measures.
working array program, sudoku program, and factorization program (slow)