removed most pep8 warnings and errors.