Move configuration to .conf a file; add graph-building function