Rewrote funcn with nested calls to use thrushing macro.

This addresses issue #20.