Added event-based classes.

TODO: Implement events.