Index: sasmodels/sasview_model.py
===================================================================
--- sasmodels/sasview_model.py	(revision 4d767110d389aa65268b4b929ac8df1413460380)
+++ sasmodels/sasview_model.py	(revision 4d767110d389aa65268b4b929ac8df1413460380)
@@ -26,4 +26,5 @@
 from . import custom
 from . import generate
+from . import weights
 
 def load_standard_models():
@@ -84,10 +85,19 @@
         self._model = None
         model_info = self._model_info
+        parameters = model_info['parameters']
 
         self.name = model_info['name']
         self.description = model_info['description']
         self.category = None
-        self.multiplicity_info = None
-        self.is_multifunc = False
+        #self.is_multifunc = False
+        for p in parameters.kernel_parameters:
+            if p.is_control:
+                profile_axes = model_info['profile_axes']
+                self.multiplicity_info = [
+                    p.limits[1], p.name, p.choices, profile_axes[0]
+                    ]
+                break
+        else:
+            self.multiplicity_info = []
 
         ## interpret the parameters
@@ -96,24 +106,27 @@
         self.params = collections.OrderedDict()
         self.dispersion = dict()
-        partype = model_info['partype']
-
-        for p in model_info['parameters']:
+
+        self.orientation_params = []
+        self.magnetic_params = []
+        self.fixed = []
+        for p in parameters.user_parameters():
             self.params[p.name] = p.default
             self.details[p.name] = [p.units] + p.limits
-
-        for name in partype['pd-2d']:
-            self.dispersion[name] = {
-                'width': 0,
-                'npts': 35,
-                'nsigmas': 3,
-                'type': 'gaussian',
-            }
-
-        self.orientation_params = (
-            partype['orientation']
-            + [n + '.width' for n in partype['orientation']]
-            + partype['magnetic'])
-        self.magnetic_params = partype['magnetic']
-        self.fixed = [n + '.width' for n in partype['pd-2d']]
+            if p.polydisperse:
+                self.dispersion[p.name] = {
+                    'width': 0,
+                    'npts': 35,
+                    'nsigmas': 3,
+                    'type': 'gaussian',
+                }
+            if p.type == 'orientation':
+                self.orientation_params.append(p.name)
+                self.orientation_params.append(p.name+".width")
+                self.fixed.append(p.name+".width")
+            if p.type == 'magnetic':
+                self.orientation_params.append(p.name)
+                self.magnetic_params.append(p.name)
+                self.fixed.append(p.name+".width")
+
         self.non_fittable = []
 
@@ -234,7 +247,8 @@
         """
         # TODO: fix test so that parameter order doesn't matter
-        ret = ['%s.%s' % (d.lower(), p)
-               for d in self._model_info['partype']['pd-2d']
-               for p in ('npts', 'nsigmas', 'width')]
+        ret = ['%s.%s' % (p.name.lower(), ext)
+               for p in self._model_info['parameters'].user_parameters()
+               for ext in ('npts', 'nsigmas', 'width')
+               if p.polydisperse]
         #print(ret)
         return ret
@@ -309,6 +323,5 @@
             # Check whether we have a list of ndarrays [qx,qy]
             qx, qy = qdist
-            partype = self._model_info['partype']
-            if not partype['orientation'] and not partype['magnetic']:
+            if not self._model_info['parameters'].has_2d:
                 return self.calculate_Iq(np.sqrt(qx ** 2 + qy ** 2))
             else:
@@ -333,12 +346,13 @@
         """
         if self._model is None:
-            self._model = core.build_model(self._model_info)
+            self._model = core.build_model(self._model_info, platform='dll')
         q_vectors = [np.asarray(q) for q in args]
-        fn = self._model.make_kernel(q_vectors)
-        pars = [self.params[v] for v in fn.fixed_pars]
-        pd_pars = [self._get_weights(p) for p in fn.pd_pars]
-        result = fn(pars, pd_pars, self.cutoff)
-        fn.q_input.release()
-        fn.release()
+        kernel = self._model.make_kernel(q_vectors)
+        pairs = [self._get_weights(p)
+                 for p in self._model_info['parameters'].call_parameters]
+        details, weights, values = core.build_details(kernel, pairs)
+        return kernel(details, weights, values, cutoff=self.cutoff)
+        kernel.q_input.release()
+        kernel.release()
         return result
 
@@ -415,13 +429,12 @@
         Return dispersion weights for parameter
         """
-        from . import weights
-        relative = self._model_info['partype']['pd-rel']
-        limits = self._model_info['limits']
-        dis = self.dispersion[par]
-        value, weight = weights.get_weights(
-            dis['type'], dis['npts'], dis['width'], dis['nsigmas'],
-            self.params[par], limits[par], par in relative)
-        return value, weight / np.sum(weight)
-
+        if par.polydisperse:
+            dis = self.dispersion[par.name]
+            value, weight = weights.get_weights(
+                dis['type'], dis['npts'], dis['width'], dis['nsigmas'],
+                self.params[par.name], par.limits, par.relative_pd)
+            return value, weight / np.sum(weight)
+        else:
+            return [self.params[par.name]], []
 
 def test_model():
