Refactor tests somewhat in an attempt to get Travis to work.

This is a refactor of the tests - we'll see if Travis CI likes them.