Add support for tox and use flake8

Where is a simple patch to enable tox support and use flake8.  Flake8 is still not passing at 100%, mostly because I don't understand the application at this point.

Nice work BTW!