Update examples to use latest API.