Callback3

I've merged dkirkham's and bomms callback2 branch with your master, as well as made a few changes. This functionality is very helpful. Would you mind accepting it upstream? Thanks.