Namespace events

Fixes #99 and #264