Index: polys/monomials/p_polys.cc
===================================================================
--- polys/monomials/p_polys.cc	(revision a04c5ec2b888d58e53a0701c12400ddca144d53e)
+++ polys/monomials/p_polys.cc	(revision f34215cd2606c6fc99bffc25e1a276b416786dca)
@@ -1134,4 +1134,124 @@
 }
 
+void p_Split(poly p, poly *h)
+{
+  *h=pNext(p);
+  pNext(p)=NULL;
+}
+
+/*2
+* pair has no common factor ? or is no polynomial
+*/
+BOOLEAN p_HasNotCF(poly p1, poly p2, const ring r)
+{
+
+  if (p_GetComp(p1,r) > 0 || p_GetComp(p2,r) > 0)
+    return FALSE;
+  int i = rVar(r);
+  loop
+  {
+    if ((p_GetExp(p1, i, r) > 0) && (p_GetExp(p2, i, r) > 0))
+      return FALSE;
+    i--;
+    if (i == 0)
+      return TRUE;
+  }
+}
+
+/*2
+* convert monomial given as string to poly, e.g. 1x3y5z
+*/
+const char * p_Read(const char *st, poly &rc, const ring r)
+{
+  if (r==NULL) { rc=NULL;return st;}
+  int i,j;
+  rc = p_Init(r);
+  const char *s = r->cf->nRead(st,&(rc->coef));
+  if (s==st)
+  /* i.e. it does not start with a coeff: test if it is a ringvar*/
+  {
+    j = r_IsRingVar(s,r);
+    if (j >= 0)
+    {
+      p_IncrExp(rc,1+j,r);
+      while (*s!='\0') s++;
+      goto done;
+    }
+  }
+  while (*s!='\0')
+  {
+    char ss[2];
+    ss[0] = *s++;
+    ss[1] = '\0';
+    j = r_IsRingVar(ss,r);
+    if (j >= 0)
+    {
+      const char *s_save=s;
+      s = eati(s,&i);
+      if (((unsigned long)i) >  r->bitmask)
+      {
+        // exponent to large: it is not a monomial
+        p_LmDelete(&rc,r);
+        return s_save;
+      }
+      p_AddExp(rc,1+j, (long)i, r);
+    }
+    else
+    {
+      // 1st char of is not a varname
+      p_LmDelete(&rc,r);
+      s--;
+      return s;
+    }
+  }
+done:
+  if (r->cf->nIsZero(pGetCoeff(rc))) p_LmDelete(&rc,r);
+  else
+  {
+#ifdef HAVE_PLURAL
+    // in super-commutative ring
+    // squares of anti-commutative variables are zeroes!
+    if(rIsSCA(r))
+    {
+      const unsigned int iFirstAltVar = scaFirstAltVar(r);
+      const unsigned int iLastAltVar  = scaLastAltVar(r);
+
+      assume(rc != NULL);
+
+      for(unsigned int k = iFirstAltVar; k <= iLastAltVar; k++)
+        if( p_GetExp(rc, k, r) > 1 )
+        {
+          p_LmDelete(&rc, r);
+          goto finish;
+        }
+    }
+#endif
+    
+    p_Setm(rc,r);
+  }
+finish:  
+  return s;
+}
+poly p_mInit(const char *st, BOOLEAN &ok, const ring r)
+{
+  poly p;
+  const char *s=p_Read(st,p,r);
+  if (*s!='\0')
+  {
+    if ((s!=st)&&isdigit(st[0]))
+    {
+      errorreported=TRUE;
+    }
+    ok=FALSE;
+    p_Delete(&p,r);
+    return NULL;
+  }
+  #ifdef PDEBUG
+  _p_Test(p,r,PDEBUG);
+  #endif
+  ok=!errorreported;
+  return p;
+}
+
 /*2
 * returns a polynomial representing the number n
Index: polys/monomials/p_polys.h
===================================================================
--- polys/monomials/p_polys.h	(revision a04c5ec2b888d58e53a0701c12400ddca144d53e)
+++ polys/monomials/p_polys.h	(revision f34215cd2606c6fc99bffc25e1a276b416786dca)
@@ -1751,4 +1751,8 @@
   return TRUE;
 }
+void      p_Split(poly p, poly * r);   /*p => IN(p), r => REST(p) */
+BOOLEAN p_HasNotCF(poly p1, poly p2, const ring r);
+poly      p_mInit(const char *s, BOOLEAN &ok, const ring r); /* monom s -> poly, interpreter */
+const char *    p_Read(const char *s, poly &p,const ring r); /* monom -> poly */
 #endif // P_POLYS_H
 
Index: polys/polys.cc
===================================================================
--- polys/polys.cc	(revision a04c5ec2b888d58e53a0701c12400ddca144d53e)
+++ polys/polys.cc	(revision f34215cd2606c6fc99bffc25e1a276b416786dca)
@@ -52,5 +52,4 @@
 {
   if (ppNoether!=NULL) pDelete(&ppNoether);
-  //pVariables = r->N;
   //pOrdSgn = r->OrdSgn;
   //pFDeg=r->pFDeg;
@@ -223,99 +222,5 @@
 }
 
-/*2
-* convert monomial given as string to poly, e.g. 1x3y5z
-*/
-const char * p_Read(const char *st, poly &rc, const ring r)
-{
-  if (r==NULL) { rc=NULL;return st;}
-  int i,j;
-  rc = p_Init(r);
-  const char *s = r->cf->nRead(st,&(rc->coef));
-  if (s==st)
-  /* i.e. it does not start with a coeff: test if it is a ringvar*/
-  {
-    j = r_IsRingVar(s,r);
-    if (j >= 0)
-    {
-      p_IncrExp(rc,1+j,r);
-      while (*s!='\0') s++;
-      goto done;
-    }
-  }
-  while (*s!='\0')
-  {
-    char ss[2];
-    ss[0] = *s++;
-    ss[1] = '\0';
-    j = r_IsRingVar(ss,r);
-    if (j >= 0)
-    {
-      const char *s_save=s;
-      s = eati(s,&i);
-      if (((unsigned long)i) >  r->bitmask)
-      {
-        // exponent to large: it is not a monomial
-        p_LmDelete(&rc,r);
-        return s_save;
-      }
-      p_AddExp(rc,1+j, (long)i, r);
-    }
-    else
-    {
-      // 1st char of is not a varname
-      p_LmDelete(&rc,r);
-      s--;
-      return s;
-    }
-  }
-done:
-  if (r->cf->nIsZero(pGetCoeff(rc))) p_LmDelete(&rc,r);
-  else
-  {
-#ifdef HAVE_PLURAL
-    // in super-commutative ring
-    // squares of anti-commutative variables are zeroes!
-    if(rIsSCA(r))
-    {
-      const unsigned int iFirstAltVar = scaFirstAltVar(r);
-      const unsigned int iLastAltVar  = scaLastAltVar(r);
-
-      assume(rc != NULL);
-
-      for(unsigned int k = iFirstAltVar; k <= iLastAltVar; k++)
-        if( p_GetExp(rc, k, r) > 1 )
-        {
-          p_LmDelete(&rc, r);
-          goto finish;
-        }
-    }
-#endif
-    p_Setm(rc,r);
-  }
-finish:
-  return s;
-}
-
 BOOLEAN _p_Test(poly p, ring r, int level);
-poly pmInit(const char *st, BOOLEAN &ok)
-{
-  poly p;
-  const char *s=p_Read(st,p,currRing);
-  if (*s!='\0')
-  {
-    if ((s!=st)&&isdigit(st[0]))
-    {
-      errorreported=TRUE;
-    }
-    ok=FALSE;
-    pDelete(&p);
-    return NULL;
-  }
-  #ifdef PDEBUG
-  _p_Test(p,currRing,PDEBUG);
-  #endif
-  ok=!errorreported;
-  return p;
-}
 
 /*2
@@ -560,21 +465,4 @@
 }
 /*----------end of utilities for syzygies--------------*/
-
-/*2
-* pair has no common factor ? or is no polynomial
-*/
-BOOLEAN pHasNotCF(poly p1, poly p2)
-{
-
-  if (pGetComp(p1) > 0 || pGetComp(p2) > 0)
-    return FALSE;
-  int i = pVariables;
-  loop
-  {
-    if ((pGetExp(p1, i) > 0) && (pGetExp(p2, i) > 0))   return FALSE;
-    i--;
-    if (i == 0)                                         return TRUE;
-  }
-}
 
 /*2
Index: polys/polys.h
===================================================================
--- polys/polys.h	(revision a04c5ec2b888d58e53a0701c12400ddca144d53e)
+++ polys/polys.h	(revision f34215cd2606c6fc99bffc25e1a276b416786dca)
@@ -11,40 +11,4 @@
 
 #include <kernel/p_polys.h>
-/*
- Some general remarks:
- We divide poly operations into roughly 4 categories:
- Level 2: operations on monomials/polynomials with constant time,
-          or operations which are just dispatchers to other
-          poly routines
-          - implemented in: pInline2.h
-          - debugging only if PDEBUG >= 2
-          - normally inlined, unless PDEBUG >= 2 || NO_INLINE2
- Level 1: operations on monomials with time proportional to length
-          - implemented in: pInline1.h
-          - debugging only if PDEBUG >= 1
-          - normally inlined, unless PDEBUG >= 1 || NO_INLINE1
- Level 0: short operations on polynomials with time proportional to
-          length of poly
-          - implemented in pInline0.cc
-          - debugging if PDEBUG
-          - normally _not_ inlined: can be forced with
-            #define DO_PINLINE0
-            #include "pInline0.h"
- Misc   : operations on polynomials which do not fit in any of the
-          above categories
-          - implemented in: polys*.cc
-          - never inlined
-          - debugging if PDEBUG >= 0
-
- You can set PDEBUG on a per-file basis, before including "mod2.h" like
-   #define PDEBUG 2
-   #include "mod2.h"
- However, PDEBUG will only be in effect, if !NDEBUG.
-
- All p_* operations take as last argument a ring
- and are ring independent. Their corresponding p* operations are usually
- just macros to the respective p_*(..,currRing).
-
-*/
 
 /***************************************************************
@@ -213,5 +177,5 @@
  *************************************************************************/
 // sorts p, assumes all monomials in p are different
-#define pSortMerger(p)          pSort(p)
+#define pSortMerger(p)          p_SortMerge(p, currRing)
 #define pSort(p)                p_SortMerge(p, currRing)
 
@@ -256,5 +220,4 @@
 
 typedef poly*   polyset;
-extern int      pVariables;
 extern int      pOrdSgn;
 extern BOOLEAN  pLexOrder;
@@ -263,6 +226,8 @@
 
 /*-------------predicate on polys ----------------------*/
-BOOLEAN   pHasNotCF(poly p1, poly p2);   /*has no common factor ?*/
-void      pSplit(poly p, poly * r);   /*p => IN(p), r => REST(p) */
+#define  pHasNotCF(p1,p2)   p_HasNotCF(p1,p2,currRing)
+                                /*has no common factor ?*/
+#define  pSplit(p,r)        p_Split(p,r)
+                                /*p => IN(p), r => REST(p) */
 
 
@@ -270,9 +235,10 @@
 /*-------------ring management:----------------------*/
 extern void pSetGlobals(const ring r, BOOLEAN complete = TRUE);
+
 // resets the pFDeg and pLDeg: if pLDeg is not given, it is
 // set to currRing->pLDegOrig, i.e. to the respective LDegProc which
 // only uses pFDeg (and not pDeg, or pTotalDegree, etc).
 // If you use this, make sure your procs does not make any assumptions
-// on oredering and/or OrdIndex -- otherwise they might return wrong results
+// on ordering and/or OrdIndex -- otherwise they might return wrong results
 // on strat->tailRing
 extern void pSetDegProcs(pFDegProc new_FDeg, pLDegProc new_lDeg = NULL);
@@ -283,5 +249,5 @@
 #define pSetm(p)    p_Setm(p, currRing)
 // TODO:
-#define pSetmComp   pSetm
+#define pSetmComp(p)   p_Setm(p, currRing)
 
 /***************************************************************
@@ -316,10 +282,8 @@
 
 
-poly      pmInit(const char *s, BOOLEAN &ok); /* monom s -> poly, interpreter */
-const char *    p_Read(const char *s, poly &p,const ring r); /* monom -> poly */
-
 /*-------------operations on polynomials:------------*/
 poly      pSub(poly a, poly b);
 poly      p_Power(poly p, int i, const ring r);
+#define pmInit(a,b) p_mInit(a,b,currRing)
 
 // ----------------- define to enable new p_procs -----*/
Index: polys/polys1.cc
===================================================================
--- polys/polys1.cc	(revision a04c5ec2b888d58e53a0701c12400ddca144d53e)
+++ polys/polys1.cc	(revision f34215cd2606c6fc99bffc25e1a276b416786dca)
@@ -446,13 +446,4 @@
   return result;
 }
-
-
-void pSplit(poly p, poly *h)
-{
-  *h=pNext(p);
-  pNext(p)=NULL;
-}
-
-
 
 int pMaxCompProc(poly p)
