diff --git a/Makefile b/Makefile
index 757e53cc890e3a784ad08046a5d358a5cccc1b00..b2fb9e0c21c71974d0902d0aed23af045e250cab 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,8 @@ PROJNAME = miscmaths
 USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB}
 USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB}
 
-OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o 
-#OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o sparse_matrix.o sparsefn.o
+OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o sparse_matrix.o sparsefn.o
+#OBJS = miscmaths.o optimise.o miscprob.o kernel.o histogram.o base2z.o t2z.o f2z.o volume.o volumeseries.o minimize.o cspline.o
 
 LIBS = -lutils -lnewmat -lprob -lm
 
diff --git a/sparse_matrix.cc b/sparse_matrix.cc
index c9edd56521a0940fd0cffc2fddcea303111664d9..5980f6b493e09715be21d8fe4991b57925c050c9 100644
--- a/sparse_matrix.cc
+++ b/sparse_matrix.cc
@@ -8,15 +8,13 @@
 #include "sparse_matrix.h"
 #include "newmatio.h"
 #include "newmat.h"
-#include "miscmaths/miscmaths.h"
-#include "newimage/newimageall.h"
+#include "miscmaths.h"
 #include "utils/tracer_plus.h"
 
 using namespace std;
 using namespace Utilities;
 using namespace NEWMAT;
 using namespace MISCMATHS;
-using namespace NEWIMAGE;
 
 namespace MISCMATHS {
 
diff --git a/sparsefn.cc b/sparsefn.cc
index 2b18592a94dc082a96888039fe6eabc7124a090a..0ccdcfee85fb44e6f9284a52c005ce8de03e7b7b 100644
--- a/sparsefn.cc
+++ b/sparsefn.cc
@@ -9,14 +9,12 @@
 #include "sparsefn.h"
 #include "newmatio.h"
 #include "newmat.h"
-#include "miscmaths/miscmaths.h"
-#include "newimage/newimageall.h"
+#include "miscmaths.h"
 #include "utils/tracer_plus.h"
 
 using namespace std;
 using namespace NEWMAT;
 using namespace MISCMATHS;
-using namespace NEWIMAGE;
 using namespace Utilities;
 
 namespace MISCMATHS {
@@ -128,32 +126,6 @@ namespace MISCMATHS {
 	}
   }
   
-  void symmmd(const SparseMatrix& A, ColumnVector& p)
-  {
-    Tracer_Plus trace("sparsefns::symmmd");
-    
-    // save indices
-    volume<int> inds(A.maxnonzerosinrow(),A.Nrows(),1);
-    inds = -1;
-    
-    if(A.maxnonzerosinrow()>32000 || A.Nrows() > 32000)
-      throw Exception("too big for AVW in symmmd");
-    
-    for(int j = 1; j<=A.Nrows(); j++)
-      {
-	const SparseMatrix::Row& rowAj = A.row(j);
-	int c = 0;
-	for(SparseMatrix::Row::const_iterator it=rowAj.begin();it!=rowAj.end();it++)
-	  {
-	    inds(c,j-1,0) = (*it).first+1;
-	    c++;
-	  }
-      }
-    
-    save_volume(inds,"/tmp/symmmd_inds");
-    system("matlab < /usr/people/woolrich/matlab/mrf/callsymmmd.m > /tmp/dev");
-    p=read_ascii_matrix("/tmp/symmmd_p").AsColumn();  
-  }
   
   void chol(const SparseMatrix& A, SparseMatrix& U, SparseMatrix& L)
   {
diff --git a/sparsefn.h b/sparsefn.h
index 2a372c2cd0a9bf1cd8588def32ceef497efabed0..740a397ad8a6f24dbdaca48f74c6b51f0eb1105c 100644
--- a/sparsefn.h
+++ b/sparsefn.h
@@ -24,7 +24,6 @@ namespace MISCMATHS {
 
   float quadratic(const ColumnVector& m, const SparseMatrix& C);
   void speye(int n, SparseMatrix& ret);
-  void symmmd(const SparseMatrix& A, ColumnVector& p);
   void chol(const SparseMatrix& A, SparseMatrix& U, SparseMatrix& L);
   void inv(const SparseMatrix& U, const SparseMatrix& L, SparseMatrix& ret);
   void solvefortracex(const SparseMatrix& U, const SparseMatrix& L, const SparseMatrix& b1, const SparseMatrix& b2, float& tr1, float& tr2);