added destrutors to classes that extencd Derivative to call parent destructor
updated to use new add_derivatives function signature