Rewrite widget code output