Index: sasmodels/compare.py
===================================================================
--- sasmodels/compare.py	(revision 256dfe1527a1dc32e1e2b9114144fb1c47f2b256)
+++ sasmodels/compare.py	(revision 51ec7e8e91f546e2293aceff7c0bb58512ad5195)
@@ -407,5 +407,5 @@
         composition_type, parts = model_info.composition
         if composition_type == 'product':
-            P, S = [get_model(revert_name(p)) for p in parts]
+            P, S = [get_model_class(revert_name(p))() for p in parts]
             model = [MultiplicationModel(P, S)]
         else:
Index: sasmodels/convert.json
===================================================================
--- sasmodels/convert.json	(revision 256dfe1527a1dc32e1e2b9114144fb1c47f2b256)
+++ sasmodels/convert.json	(revision 51ec7e8e91f546e2293aceff7c0bb58512ad5195)
@@ -600,6 +600,8 @@
   ], 
   "rpa": [
-    "RPAModel", 
-    {
+    "RPA10Model",
+    {
+      "K12": "Kab", "K13": "Kac", "K14": "Kad",
+      "K23": "Kbc", "K24": "Kbd", "K34": "Kcd",
       "N1": "Na", "N2": "Nb", "N3": "Nc", "N4": "Nd",
       "L1": "La", "L2": "Lb", "L3": "Lc", "L4": "Ld",
Index: sasmodels/convert.py
===================================================================
--- sasmodels/convert.py	(revision 4a21b1211168349f6cb11c18d3e1b39a9c7919f0)
+++ sasmodels/convert.py	(revision 51ec7e8e91f546e2293aceff7c0bb58512ad5195)
@@ -176,7 +176,8 @@
             newid = p.id
             oldid = translation.get(p.id, p.id)
-            del translation[newid]
+            translation.pop(newid, None)
             for k in range(1, p.length+1):
-                translation[newid+str(k)] = oldid+str(k)
+                if newid+str(k) not in translation:
+                    translation[newid+str(k)] = oldid+str(k)
     # Remove control parameter from the result
     if model_info.control:
@@ -211,6 +212,6 @@
     else:
         translation = _get_translation_table(model_info)
-    oldpars = _revert_pars(_unscale_sld(pars), translation)
-    oldpars = _trim_vectors(model_info, pars, oldpars)
+        oldpars = _revert_pars(_unscale_sld(pars), translation)
+        oldpars = _trim_vectors(model_info, pars, oldpars)
 
 
@@ -246,4 +247,16 @@
             for p in "L1", "L2", "L3", "L4":
                 if p in oldpars: oldpars[p] *= 1e-13
+            if pars['case_num'] < 2:
+                for k in ("a", "b"):
+                    for p in ("L", "N", "Phi", "b", "v"):
+                        oldpars.pop(p+k, None)
+                for k in "Kab,Kac,Kad,Kbc,Kbd".split(','):
+                    oldpars.pop(k, None)
+            elif pars['case_num'] < 5:
+                for k in ("a",):
+                    for p in ("L", "N", "Phi", "b", "v"):
+                        oldpars.pop(p+k, None)
+                for k in "Kab,Kac,Kad".split(','):
+                    oldpars.pop(k, None)
         elif name == 'core_shell_parallelepiped':
             _remove_pd(oldpars, 'rimA', name)
Index: sasmodels/models/rpa.c
===================================================================
--- sasmodels/models/rpa.c	(revision abdd01cc0315960ae6e5951909d2866515e37bae)
+++ sasmodels/models/rpa.c	(revision 51ec7e8e91f546e2293aceff7c0bb58512ad5195)
@@ -6,24 +6,318 @@
 
 double Iq(double q, double case_num,
-    double N[], double Phi[], double v[], double L[], double b[],
-    double Kab, double Kac, double Kad,
+    double N[],    // DEGREE OF POLYMERIZATION
+    double Phi[],  // VOL FRACTION
+    double v[],    // SPECIFIC VOLUME
+    double L[],    // SCATT. LENGTH
+    double b[],    // SEGMENT LENGTH
+    double Kab, double Kac, double Kad,  // CHI PARAM
     double Kbc, double Kbd, double Kcd
-    ) {
+    )
+{
   int icase = (int)case_num;
 
-#if 0  // Sasview defaults
+  double Nab,Nac,Nad,Nbc,Nbd,Ncd;
+  double Phiab,Phiac,Phiad,Phibc,Phibd,Phicd;
+  double vab,vac,vad,vbc,vbd,vcd;
+  double m;
+  double Xa,Xb,Xc,Xd;
+  double Paa,S0aa,Pab,S0ab,Pac,S0ac,Pad,S0ad;
+  double S0ba,Pbb,S0bb,Pbc,S0bc,Pbd,S0bd;
+  double S0ca,S0cb,Pcc,S0cc,Pcd,S0cd;
+  double S0da,S0db,S0dc,Pdd,S0dd;
+  double Kaa,Kbb,Kcc,Kdd;
+  double Kba,Kca,Kda,Kcb,Kdb,Kdc;
+  double Zaa,Zab,Zac,Zba,Zbb,Zbc,Zca,Zcb,Zcc;
+  double DenT,T11,T12,T13,T21,T22,T23,T31,T32,T33;
+  double Y1,Y2,Y3,X11,X12,X13,X21,X22,X23,X31,X32,X33;
+  double ZZ,DenQ1,DenQ2,DenQ3,DenQ,Q11,Q12,Q13,Q21,Q22,Q23,Q31,Q32,Q33;
+  double N11,N12,N13,N21,N22,N23,N31,N32,N33;
+  double M11,M12,M13,M21,M22,M23,M31,M32,M33;
+  double S11,S12,S13,S14,S21,S22,S23,S24;
+  double S31,S32,S33,S34,S41,S42,S43,S44;
+  double Lad,Lbd,Lcd,Nav,Intg;
+
+  //icase was shifted to N-1 from the original code
+  if (icase <= 1){
+    Phi[0] = Phi[1] = 0.0000001;
+    N[0] = N[1] = 1000.0;
+    L[0] = L[1] = 1.e-12;
+    v[0] = v[1] = 100.0;
+    b[0] = b[1] = 5.0;
+    Kab = Kac = Kad = Kbc = Kbd = -0.0004;
+  }
+  else if ((icase > 1) && (icase <= 4)){
+    Phi[0] = 0.0000001;
+    N[0] = 1000.0;
+    L[0] = 1.e-12;
+    v[0] = 100.0;
+    b[0] = 5.0;
+    Kab = Kac = Kad = -0.0004;
+  }
+
+  Nab=sqrt(N[0]*N[1]);
+  Nac=sqrt(N[0]*N[2]);
+  Nad=sqrt(N[0]*N[3]);
+  Nbc=sqrt(N[1]*N[2]);
+  Nbd=sqrt(N[1]*N[3]);
+  Ncd=sqrt(N[2]*N[3]);
+
+  vab=sqrt(v[0]*v[1]);
+  vac=sqrt(v[0]*v[2]);
+  vad=sqrt(v[0]*v[3]);
+  vbc=sqrt(v[1]*v[2]);
+  vbd=sqrt(v[1]*v[3]);
+  vcd=sqrt(v[2]*v[3]);
+
+  Phiab=sqrt(Phi[0]*Phi[1]);
+  Phiac=sqrt(Phi[0]*Phi[2]);
+  Phiad=sqrt(Phi[0]*Phi[3]);
+  Phibc=sqrt(Phi[1]*Phi[2]);
+  Phibd=sqrt(Phi[1]*Phi[3]);
+  Phicd=sqrt(Phi[2]*Phi[3]);
+
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ab=0.000002;
+    S0ac=0.000003;
+    S0ad=0.000004;
+    S0bb=0.000005;
+    S0bc=0.000006;
+    S0bd=0.000007;
+    S0cd=0.000008;
+    break;
+  case 1:
+    S0aa=0.000001;
+    S0ab=0.000002;
+    S0ac=0.000003;
+    S0ad=0.000004;
+    S0bb=0.000005;
+    S0bc=0.000006;
+    S0bd=0.000007;
+    break;
+  case 2:
+    S0aa=0.000001;
+    S0ab=0.000002;
+    S0ac=0.000003;
+    S0ad=0.000004;
+    S0bc=0.000005;
+    S0bd=0.000006;
+    S0cd=0.000007;
+    break;
+  case 3:
+    S0aa=0.000001;
+    S0ab=0.000002;
+    S0ac=0.000003;
+    S0ad=0.000004;
+    S0bc=0.000005;
+    S0bd=0.000006;
+    break;
+  case 4:
+    S0aa=0.000001;
+    S0ab=0.000002;
+    S0ac=0.000003;
+    S0ad=0.000004;
+    break;
+  case 5:
+    S0ab=0.000001;
+    S0ac=0.000002;
+    S0ad=0.000003;
+    S0bc=0.000004;
+    S0bd=0.000005;
+    S0cd=0.000006;
+    break;
+  case 6:
+    S0ab=0.000001;
+    S0ac=0.000002;
+    S0ad=0.000003;
+    S0bc=0.000004;
+    S0bd=0.000005;
+    break;
+  case 7:
+    S0ab=0.000001;
+    S0ac=0.000002;
+    S0ad=0.000003;
+    break;
+  case 8:
+    S0ac=0.000001;
+    S0ad=0.000002;
+    S0bc=0.000003;
+    S0bd=0.000004;
+    break;
+  default : //case 9:
+    break;
+  }
+  S0ba=S0ab;
+  S0ca=S0ac;
+  S0cb=S0bc;
+  S0da=S0ad;
+  S0db=S0bd;
+  S0dc=S0cd;
+
+  Kaa=0.0;
+  Kbb=0.0;
+  Kcc=0.0;
+  Kdd=0.0;
+
+  Kba=Kab;
+  Kca=Kac;
+  Kcb=Kbc;
+  Kda=Kad;
+  Kdb=Kbd;
+  Kdc=Kcd;
+
+  Zaa=Kaa-Kad-Kad;
+  Zab=Kab-Kad-Kbd;
+  Zac=Kac-Kad-Kcd;
+  Zba=Kba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33+Zcc;
+
+  M11= N11*S0aa + N12*S0ab + N13*S0ac;
+  M12= N11*S0ab + N12*S0bb + N13*S0bc;
+  M13= N11*S0ac + N12*S0bc + N13*S0cc;
+  M21= N21*S0aa + N22*S0ab + N23*S0ac;
+  M22= N21*S0ab + N22*S0bb + N23*S0bc;
+  M23= N21*S0ac + N22*S0bc + N23*S0cc;
+  M31= N31*S0aa + N32*S0ab + N33*S0ac;
+  M32= N31*S0ab + N32*S0bb + N33*S0bc;
+  M33= N31*S0ac + N32*S0bc + N33*S0cc;
+
+  DenQ1=1.0+M11-M12*M21+M22+M11*M22-M13*M31-M13*M22*M31;
+  DenQ2=  M12*M23*M31+M13*M21*M32-M23*M32-M11*M23*M32+M33+M11*M33;
+  DenQ3=  -M12*M21*M33+M22*M33+M11*M22*M33;
+  DenQ=DenQ1+DenQ2+DenQ3;
+
+  Q11= (1.0 + M22-M23*M32 + M33 + M22*M33)/DenQ;
+  Q12= (-M12 + M13*M32 - M12*M33)/DenQ;
+  Q13= (-M13 - M13*M22 + M12*M23)/DenQ;
+  Q21= (-M21 + M23*M31 - M21*M33)/DenQ;
+  Q22= (1.0 + M11 - M13*M31 + M33 + M11*M33)/DenQ;
+  Q23= (M13*M21 - M23 - M11*M23)/DenQ;
+  Q31= (-M31 - M22*M31 + M21*M32)/DenQ;
+  Q32= (M12*M31 - M32 - M11*M32)/DenQ;
+  Q33= (1.0 + M11 - M12*M21 + M22 + M11*M22)/DenQ;
+
+  S11= Q11*S0aa + Q21*S0ab + Q31*S0ac;
+  S12= Q12*S0aa + Q22*S0ab + Q32*S0ac;
+  S13= Q13*S0aa + Q23*S0ab + Q33*S0ac;
+  S14=-S11-S12-S13;
+  S21= Q11*S0ba + Q21*S0bb + Q31*S0bc;
+  S22= Q12*S0ba + Q22*S0bb + Q32*S0bc;
+  S23= Q13*S0ba + Q23*S0bb + Q33*S0bc;
+  S24=-S21-S22-S23;
+  S31= Q11*S0ca + Q21*S0cb + Q31*S0cc;
+  S32= Q12*S0ca + Q22*S0cb + Q32*S0cc;
+  S33= Q13*S0ca + Q23*S0cb + Q33*S0cc;
+  S34=-S31-S32-S33;
+  S41=S14;
+  S42=S24;
+  S43=S34;
+  S44=S11+S22+S33+2.0*S12+2.0*S13+2.0*S23;
+
+  Nav=6.022045e+23;
+  Lad=(L[0]/v[0]-L[3]/v[3])*sqrt(Nav);
+  Lbd=(L[1]/v[1]-L[3]/v[3])*sqrt(Nav);
+  Lcd=(L[2]/v[2]-L[3]/v[3])*sqrt(Nav);
+
+  Intg=Lad*Lad*S11+Lbd*Lbd*S22+Lcd*Lcd*S33+2.0*Lad*Lbd*S12+2.0*Lbd*Lcd*S23+2.0*Lad*Lcd*S13;
+
+  return Intg;
+
+
+/*  Attempts at a new implementation --- supressed for now
+#if 1  // Sasview defaults
   if (icase <= 1) {
     N[0]=N[1]=1000.0;
     Phi[0]=Phi[1]=0.0000001;
     Kab=Kac=Kad=Kbc=Kbd=-0.0004;
-    La=Lb=1.0e-12;
-    va=vb=100.0;
-    ba=bb=5.0;
+    L[0]=L[1]=1.0e-12;
+    v[0]=v[1]=100.0;
+    b[0]=b[1]=5.0;
   } else if (icase <= 4) {
     Phi[0]=0.0000001;
     Kab=Kac=Kad=-0.0004;
-    La=1.0e-12;
-    va=100.0;
-    ba=5.0;
+    L[0]=1.0e-12;
+    v[0]=100.0;
+    b[0]=5.0;
   }
 #else
@@ -297,4 +591,4 @@
 
   return result;
-
+*/
 }
Index: sasmodels/models/rpa.py
===================================================================
--- sasmodels/models/rpa.py	(revision ce176caba4802eee1a0c785304905c3c225d3c93)
+++ sasmodels/models/rpa.py	(revision 51ec7e8e91f546e2293aceff7c0bb58512ad5195)
@@ -69,5 +69,5 @@
 See details in the model function help
 """
-category = ""
+category = "shape-independent"
 
 CASES = [
@@ -102,7 +102,7 @@
 ]
 
-category = "shape-independent"
 
 source = ["rpa.c"]
+single = False
 
 control = "case_num"
