Corrected partial derivative calculations, added derivative calculation for new membership functions, added testing