Index: Singular/test.cc
===================================================================
--- Singular/test.cc	(revision f29ab6c2e7fe07c324d37a46dfb6a9760b4ecb66)
+++ Singular/test.cc	(revision 6bcd03666caa3b8ab756699b67b73bff50821c70)
@@ -245,74 +245,4 @@
 
 
-// Source files in Singular/
-/*
-#include "attrib.cc"
-#include "bbcone.cc"
-#include "bbfan.cc"
-#include "bigintm.cc"
-#include "blackbox.cc"
-#include "calcSVD.cc"
-#include "claptmpl.cc"
-#include "cntrlc.cc"
-#include "denom_list.cc"
-#include "eigenval_ip.cc"
-#include "emacs.cc"
-#include "extra.cc"
-#include "fehelp.cc"
-#include "feOpt.cc"
-#include "fglm.cc"
-#include "gentable2.cc"
-#include "gentable.cc"
-#include "gms.cc"
-#include "grammar.cc"
-#include "interpolation.cc"
-#include "iparith.cc"
-#include "ipassign.cc"
-#include "ipconv.cc"
-#include "ipid.cc"
-#include "iplib.cc"
-#include "ipprint.cc"
-#include "ipshell.cc"
-#include "janet.cc"
-#include "libparse.cc"
-#include "linearAlgebra_ip.cc"
-#include "lists.cc"
-#include "maps_ip.cc"
-#include "Minor.cc"
-#include "MinorInterface.cc"
-#include "MinorProcessor.cc"
-#include "minpoly.cc"
-#include "misc_ip.cc"
-#include "mpsr_Error.cc"
-#include "mpsr_Get.cc"
-#include "mpsr_GetMisc.cc"
-#include "mpsr_GetPoly.cc"
-#include "mpsr_Put.cc"
-#include "mpsr_PutPoly.cc"
-#include "mpsr_sl.cc"
-#include "mpsr_Timer.cc"
-#include "mpsr_Tok.cc"
-#include "ndbm.cc"
-#include "newstruct.cc"
-#include "pcv.cc"
-#include "pipeLink.cc"
-#include "pyobject.cc"
-#include "pyobject_setup.cc"
-#include "scanner.cc"
-#include "sdb.cc"
-#include "silink.cc"
-#include "sing_dbm.cc"
-#include "sing_win.cc"
-#include "slInit_Dynamic.cc"
-#include "slInit_Static.cc"
-#include "ssiLink.cc"
-#include "subexpr.cc"
-#include "test.cc"
-#include "tesths.cc"
-#include "utils.cc"
-#include "walk.cc"
-#include "walk_ip.cc"
-#include "wrapper.cc"
-*/
 void siInit(char *);
 
@@ -363,4 +293,5 @@
    
   rDelete(R);
+  rChangeCurrRing(NULL);
    
 
Index: kernel/test.cc
===================================================================
--- kernel/test.cc	(revision f29ab6c2e7fe07c324d37a46dfb6a9760b4ecb66)
+++ kernel/test.cc	(revision 6bcd03666caa3b8ab756699b67b73bff50821c70)
@@ -51,6 +51,7 @@
 
 #ifdef HAVE_FACTORY
-int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!!
-int mmInit(void) {return 1; } // ? due to SINGULAR!!!...???
+// The following are needed due to FACTORY (e.g. initCanonicalForm)
+int initializeGMP(){ return 1; } 
+int mmInit(void) {return 1; }
 #endif
 
@@ -186,130 +187,7 @@
 
 
-// Sources:
-/*
-#include "febase.cc"
-#include "feread.cc"
-#include "hdegree.cc"
-#include "hilb.cc"
-#include "hutil.cc"
-#include "gr_kstd2.cc"
-#include "ideals.cc"
-#include "int64vec.cc"
-#include "khstd.cc"
-#include "kstdfac.cc"
-#include "kstd1.cc"
-#include "kstd2.cc"
-#include "kutil.cc"
-// #include "maps.cc" // moved to polys
-// #include "matpol.cc" // same!
-#include "misc.cc"
-// #include "sparsmat.cc" // same!
-#include "fast_maps.cc"
-#include "fglmzero.cc" // looks like <factory/templates/ftmpl_list.h> must be installed!
-#include "fglmvec.cc"
-#include "fglmgauss.cc"
-#include "fglmhom.cc"
-#include "fglmcomb.cc"
-// #include "numbers.cc" // moved
-// #include "polys.cc" // same
-// #include "p_polys.cc" // same
-// #include "polys0.cc" // same
-// #include "polys1.cc" // same
-// #include "polys-impl.cc" // same
-#include "kspoly.cc"
-#include "syz.cc"
-#include "syz0.cc"
-#include "syz1.cc"
-#include "syz2.cc"
-#include "syz3.cc"
-#include "timer.cc"
-#include "GMPrat.cc"
-#include "multicnt.cc"
-#include "npolygon.cc"
-#include "semic.cc"
-#include "spectrum.cc"
-#include "splist.cc"
-#include "walkProc.cc"
-#include "walkMain.cc"
-#include "walkSupport.cc"
-#include "eigenval.cc"
-#include "units.cc"
-#include "fast_mult.cc"
-#include "digitech.cc"
-#include "tgb.cc"
-#include "tgbgauss.cc"
-#include "ringgb.cc"
-#include "f5data.cc"
-#include "f5lists.cc"
-#include "f5gb.cc"
-#include "f5c.cc"
-#include "F5cLists.cc"
-#include "ratgring.cc"
-#include "shiftgb.cc"
-#include "gfan.cc"
-#include "linearAlgebra.cc"
-
-  
+// #include "fglmzero.cc" // looks like <factory/templates/ftmpl_list.h> must be installed!
 // TODO: looks like <coeffs/mpr_complex.h> must be installed!
 
-// Now ALL the sources from here...
-#include "digitech.cc"
-#include "eigenval.cc"
-#include "F4.cc"
-#include "f5c.cc"
-#include "F5cData.cc"
-#include "F5cLists.cc"
-#include "f5data.cc"
-#include "f5gb.cc"
-#include "f5lists.cc"
-#include "fast_maps.cc"
-#include "fast_mult.cc"
-#include "febase.cc"
-#include "feread.cc"
-#include "fglmcomb.cc"
-#include "fglmgauss.cc"
-#include "fglmhom.cc"
-#include "fglmvec.cc"
-#include "fglmzero.cc"
-#include "gfan.cc"
-#include "GMPrat.cc"
-#include "gr_kstd2.cc"
-#include "hdegree.cc"
-#include "hilb.cc"
-#include "hutil.cc"
-#include "ideals.cc"
-#include "int64vec.cc"
-#include "khstd.cc"
-#include "kInline.h"
-#include "kpolys.cc"
-#include "kspoly.cc"
-#include "kstd1.cc"
-#include "kstd2.cc"
-#include "kstdfac.cc"
-#include "kutil.cc"
-#include "linearAlgebra.cc"
-#include "misc.cc"
-#include "mmalloc.cc"
-#include "multicnt.cc"
-#include "npolygon.cc"
-#include "ratgring.cc"
-#include "ringgb.cc"
-#include "semic.cc"
-#include "shiftgb.cc"
-#include "spectrum.cc"
-#include "splist.cc"
-#include "syz0.cc"
-#include "syz1.cc"
-#include "syz2.cc"
-#include "syz3.cc"
-#include "syz.cc"
-#include "tgb.cc"
-#include "tgbgauss.cc"
-#include "timer.cc"
-#include "units.cc"
-#include "walkMain.cc"
-#include "walkProc.cc"
-#include "walkSupport.cc"
-*/
 
 
