Improve sample.js.