Implemented graph loading from input files.