Integrate flake8 into Travis configuration and fix flake8 flagged errors.
Add coveralls badge to README.
Set maximum McCabe complexity for project to 10 and refactor violations.