Fixed directory structure. Added "NaN" if Hessian is not invertible.