Fix flake8 errors, resolve #10