minor changes to forward declaration and the code for the hessian with loops
reorganized code used by the hessian with loops;
initial work on the reverse mode order 2 (WIP).