Fixes per waigani review.

More error tracing, godoc comments, formatting.