Allow FirstDerivative of 'datarefs' and 'datadefs'
Clean up some more of the dataref/datadef code