Faster distribution tests + other test fixes

Tried to fix long test issues causing Travis timeouts and a variety of other test issues.