Gradient optimization segfault fixed - numerical gradient calculation verified with G's code.  GradMat currently doesn't match numGradMat