Test cleanup

This supersedes #38 and fixes the tests along with the travis fixes.