Initial pass at boxed errors

The next step is to clean up the error handling in general so that
failure cases produce good errors.