More work towards joint inversion. There is now one class for inversion cost function which can handle all relevant cases for a single model inversion, cross gradient case and functional dependence of physical parameters.