Cleaned up the code, no bug fixes but added tox and improved the release script.