Replaced usages of wrapFunction with appendFunction.