Update pending example to latest API.
Inline documentation.