Added capability of turning off the line search in GradientDescent and fixed compile errors.