Add callbacks for #connect/#disconnect functions