Fixes pep8 and syntax errors