Make all the tests pass

Closes #767.