typedef for dispatcher callback functions
Added another callback for cleanup