Improvements to event callback system.
* Adding error event [1/2]
Fixes for event system