Fixing pep8 and pyflakes errors