More tests, added support for errors in tests.