Setting up tox and conforming to standards

Added configuration for tox, and corrected all pep8 related issues.