Update tests

* Also fix minor bugs in how errors were thrown(!)