Refactor test/setup.
Fix Travis support.