Fixed MassFunction class to take new fitting_functions structure