Support for events

RE #66

Please review. Happy to change.