Implement injection patterns as documented.

This fixes #167.