Finalize example program and write corresponding text for it in the tutorial.