Rewriting of mixture_density class