Moving functions for creating graph lists out of main code file