Gradient descent doesn't work properly. Much debugging ahead.