New func. declarations written to output file

The replacement function declarations are now properly written
to file