Correct failing tests

This applies a bunch of simple fixes to make the tests pass.
Merge pull request #13 from emiln/fix/12-broken-tests

Correct failing tests, closing #12.