Fix flake8 issues

Fix some flake8/hacking issues