code cleanup

formatting and import cleanup
Input Validation

Input Validation added
Additional  error checking during factorization and prime list loading
Minor UI adjustments