Implemented tvd algorithm, refactored travis configuration, added flake8 configuration.