Moved graph output functions to new input/output file.