Added utilities to prevent memory leaks in event propagation.
Merge pull request #143 from tsherif/event-cleanup

Added utilities to prevent memory leaks in event propagation. Closes #139.