Finally get automated differentiation working in the way we would
like.