Improve callback mechanism to allow an arbitrary userData pointer to be passed during callback registration that will subsequently be passed to the callback