add subrefs for dynamic bits in the static API

This allows the user to add some dynamic code and makes the custom
arguments a little more useful in the recommended, static API.

They also work in the dynamic API, but that's not nearly as interesting.

Fixes #17