Fixed some syntax errors and commented out some print statements.
Also got rid of an unnecessary error check.