Moved graph helping methods into GraphHelper