Fixed PEP8 and syntax issues

There was a few syntax issues, pep8 problems, and unused variables.