Clear graph library when in main
Simplify runtime handling, refs #324