Interaction composition

Fixes #79.