Added callbacks to manage events.

Added some functionality as default but it is possible overwrites these callback methods to adapts functionality