Implement event extension.

Closes #241.