Update tutorial code to show more user-friendly API

Change-Id: I95c82d2256221b0068d6c2762f6dbb8a1e29b6b8