Fixes up agony calculation by keeping graph and weights separate.