Add more Doxygen comments.
Update example in README file.

We now have CheckFoo() functions that handle failure cases: use them.