Got rid of invHT, which computed gradients based on the old forwardKin gradient format.
dofnum fix.