Added storage of the callback and threshold.

Exactly what we think.