Style changes to autodiff code