Complete work on #138.

Kudos to @peterkelly ;-).