Implemented "onExpire" callback hooks.

Implements the "onExpire" callback hooks described in #27