Fixed the gradient calculation

Now the conjugate gradient actually works. And it actually does form a
hexagon