Better error formatting. Bring in tests (oops).