remove unused callback code

Looks like it isn't used (note all the `#if(0)`) and it doesn't work with multiple threads.

Let's discuss.