Added some more protection from potential changes.
Added support for flake8 reporting