Use new helpers in an example script. Fix a few bugs.