Update code sample and fix link in README.