Get most of the tests passing again
Merge pull request #292 from benmccann/fix-tests

Get most of the tests passing again