Implement extension via objects.

Implement extension via objects along with an example for event
handlers.

Closes #237.