Improve the test suite

Several small fixes in order to pass the tests.

...and remember, TravisCI is your friend!