Made some callbacks optional.