Most of the flake8 issues resolved. Not sure what to do about the locals