Added the preliminaryCallbacks code.