Ran through flake8 and fixed some style issues