Implemented event optional event emitter.

The event emitter emits events when the before, between and after classes are set,
and allows developers to more freely bind actions to the different events.
Added simple docs for the event emitter