Rewrite of function output code.