Fix problems in untested code.
Update code examples and mention API changes. API docs still stale.