engine: pep8/pyflakes cleanup