Added resetGraph method.