Updated H3 API code to support scripts, and included an example.