Added flake8.cfg and cleaned up code.