diff --git a/ccopsOptions.h b/ccopsOptions.h
index 833efdcbece358aaadca5ac13e450bc3e13cd085..9732fcfef7d5d157d9ef6aacbd30c1b137d2381a 100644
--- a/ccopsOptions.h
+++ b/ccopsOptions.h
@@ -15,6 +15,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "utils/options.h"
+#include "commonopts.h"
 using namespace Utilities;
 
 namespace CCOPS {
diff --git a/commonopts.h b/commonopts.h
new file mode 100644
index 0000000000000000000000000000000000000000..beeb06eb6eb53832e942e6180f27edc63ed77ffd
--- /dev/null
+++ b/commonopts.h
@@ -0,0 +1,17 @@
+/*  commonopts.h
+
+    Mark Jenkinson and Dave Flitney, FMRIB Image Analysis Group
+
+    Copyright (C) 2007 University of Oxford  */
+
+/*  CCOPYRIGHT  */
+
+#if !defined(commonopts_h)
+#define commonopts_h
+
+using std::string;
+using std::cerr;
+using std::cout;
+using std::endl;
+
+#endif
diff --git a/dtifitOptions.h b/dtifitOptions.h
index b29848cd16be0ca8d0f3af831cc94c1476eb9dab..024fc804ec9aa7b14cbdac3245095de2ae263748 100644
--- a/dtifitOptions.h
+++ b/dtifitOptions.h
@@ -15,7 +15,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "utils/options.h"
+#include "commonopts.h"
 //#include "newmatall.h"
+
 using namespace Utilities;
 
 namespace DTIFIT {
diff --git a/probtrackOptions.h b/probtrackOptions.h
index 4717d6141f126b0fd03cb4d2e1b6b6053ee036a1..4590454b781c444dfc89871406c46d24c4bb2056 100644
--- a/probtrackOptions.h
+++ b/probtrackOptions.h
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include "utils/options.h"
 #include "utils/log.h"
+#include "commonopts.h"
 
 //#include "newmatall.h"
 using namespace Utilities;
diff --git a/probtrackxOptions.h b/probtrackxOptions.h
index 92a89a05eb35a75c4b6ec193bf8ad57518b78301..688d2a2d94c3067c66b74f13cf69387cae87a664 100644
--- a/probtrackxOptions.h
+++ b/probtrackxOptions.h
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include "utils/options.h"
 #include "utils/log.h"
+#include "commonopts.h"
 
 //#include "newmatall.h"
 using namespace Utilities;
diff --git a/pt_alltracts.cc b/pt_alltracts.cc
index d297f9ae35b13278f774d2936edeaf7f82faace6..dda056d31abd532f6b6f5a84dd841edd1ff39185 100644
--- a/pt_alltracts.cc
+++ b/pt_alltracts.cc
@@ -65,7 +65,7 @@ void alltracts(){
   
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
diff --git a/pt_matrix.cc b/pt_matrix.cc
index 4c78d2584f33564ebec40b7f76395810eabe69b2..bdc3b68f51c84cbee5f5210d48fb143cd654ff7c 100644
--- a/pt_matrix.cc
+++ b/pt_matrix.cc
@@ -152,7 +152,7 @@ void matrix2(){
   
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
@@ -386,7 +386,7 @@ void matrix1(){
   
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
@@ -605,7 +605,7 @@ void maskmatrix(){
 
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
diff --git a/pt_matrix_mesh.cc b/pt_matrix_mesh.cc
index 2220375cfb137c538f729aa50720eb52a596b1c2..fad14239601562df111b8c9862afc50f671de6cf 100644
--- a/pt_matrix_mesh.cc
+++ b/pt_matrix_mesh.cc
@@ -140,7 +140,7 @@ void mesh_matrix2(){
   
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
@@ -330,7 +330,7 @@ void mesh_lengths(){
   }
   
   Matrix Seeds_to_DTI;
-  read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); // Here seeds_to_dti should take the standard volume to diff space 
+  Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); // Here seeds_to_dti should take the standard volume to diff space 
   
   float lcrat=5;
   volume4D<float> loopcheck((int)ceil(mask.xsize()/lcrat)+1,(int)ceil(mask.ysize()/lcrat)+1,(int)ceil(mask.zsize()/lcrat)+1,3);
diff --git a/pt_seeds_to_targets.cc b/pt_seeds_to_targets.cc
index 4193840c70c775f0f2de521d01bc486c7fb16f11..57ba00c309a9452b56dd2ec0d79e600dfe83c527 100644
--- a/pt_seeds_to_targets.cc
+++ b/pt_seeds_to_targets.cc
@@ -90,7 +90,7 @@ void seeds_to_targets()
   
   Matrix Seeds_to_DTI;
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
diff --git a/pt_simple.cc b/pt_simple.cc
index ea90070fe0ba430ee246110f62e94ed419890cef..1bafb24a25a6186e3f8afc0c0875023f42fa0aa5 100644
--- a/pt_simple.cc
+++ b/pt_simple.cc
@@ -35,7 +35,7 @@ void track(){
   if(opts.seedref.value()!=""){
     read_volume(prob,opts.seedref.value());
     beenhere=prob*0;
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     prob=mask;
diff --git a/pt_twomasks.cc b/pt_twomasks.cc
index f2b721e2b3ca6ea63d34d371771f17f2eb8c4a26..2d6cd5523b655a9be62d81d1ecca9fb9f267f861 100644
--- a/pt_twomasks.cc
+++ b/pt_twomasks.cc
@@ -75,7 +75,7 @@ void twomasks_symm(){
   Matrix Seeds_to_DTI;
   
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
@@ -315,7 +315,7 @@ void waypoints(){
   Matrix Seeds_to_DTI;
   
   if(opts.seeds_to_dti.value()!=""){
-    read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value());
+    Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
   }
   else{
     Seeds_to_DTI=Identity(4);
diff --git a/streamlines.cc b/streamlines.cc
index 59f38d9c6ac3f0bc93cd408b75ee411f2cefeb61..6ecbf8b25466fa375996cf4981131bd0b127a158 100644
--- a/streamlines.cc
+++ b/streamlines.cc
@@ -61,7 +61,7 @@ namespace TRACT{
       }
     } 
     if(opts.seeds_to_dti.value()!=""){
-      read_ascii_matrix(m_Seeds_to_DTI,opts.seeds_to_dti.value());
+      m_Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value());
     }
     else{
       m_Seeds_to_DTI=Identity(4);
diff --git a/tractOptions.h b/tractOptions.h
index 3fbab83ff12931e6acfe87459cd34e1c61d759af..8ae5f670fc8df01d656b6605db69afc8720044cf 100644
--- a/tractOptions.h
+++ b/tractOptions.h
@@ -15,6 +15,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "utils/options.h"
+#include "commonopts.h"
 
 //#include "newmatall.h"
 using namespace Utilities;
diff --git a/vecreg.cc b/vecreg.cc
index 0160ed8a8f0bb90ee9ad00f430e7621694d88b53..74861247cfd993d50b30df7676d605cd36c62b30 100755
--- a/vecreg.cc
+++ b/vecreg.cc
@@ -219,7 +219,7 @@ int do_vecreg(){
   volumeinfo vinfo;
 
   if((matrix.set())){
-    read_ascii_matrix(Aff,matrix.value());
+    Aff = read_ascii_matrix(matrix.value());
   }
   if((warp.set())){
     if(verbose.value()) cerr << "Loading warpfield" << endl;