Index: Makefile
==================================================================
--- Makefile
+++ Makefile
@@ -28,11 +28,11 @@
            ezsteps.scm lock-queue.scm sdb.scm rmt.scm api.scm		\
            subrun.scm portlogger.scm archive.scm env.scm		\
            diff-report.scm cgisetup/models/pgdb.scm
 
 # module source files
-MSRCFILES = ftail.scm rmtmod.scm commonmod.scm
+MSRCFILES = 
 # ftail.scm rmtmod.scm commonmod.scm removed
 # MSRCFILES = ducttape-lib.scm pkts.scm stml2.scm cookie.scm mutils.scm	\
 #             mtargs.scm commonmod.scm dbmod.scm adjutant.scm ulex.scm	\
 #             rmtmod.scm apimod.scm
 
@@ -81,11 +81,11 @@
 PNGFILES = $(shell cd docs/manual;ls *png)
 
 # all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard
 all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut tcmt
 
-mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MOIMPFILES)
+mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MOIMPFILES)  megatest-version.scm
 	csc $(CSCOPTS) $(OFILES) $(MOFILES) $(MOIMPFILES) megatest.o -o mtest
 
 showmtesthash:
 	@echo $(MTESTHASH)
 
@@ -111,27 +111,25 @@
 	keys.o \
 	launch.o \
 	lock-queue.o \
 	margs.o \
 	mt.o \
-	megatest-version.o \
 	ods.o \
 	portlogger.o \
 	process.o \
 	rmt.o \
-        mofiles/rmtmod.o \
-        mofiles/commonmod.o \
-        rpc-transport.o \
 	runconfig.o \
 	runs.o \
 	server.o \
 	tasks.o \
 	tdb.o \
 	tests.o \
 	subrun.o \
         ezsteps.o
 
+#        mofiles/rmtmod.o \
+#        mofiles/commonmod.o \
 
 tcmt : $(TCMTOBJS) tcmt.scm megatest-version.scm
 	csc $(CSCOPTS) $(TCMTOBJS) $(MOFILES) $(MOIMPFILES) tcmt.scm -o tcmt
 
 # install documentation to $(PREFIX)/docs
@@ -170,18 +168,18 @@
 
 runs.o : test_records.scm
 
 megatest.o : megatest-fossil-hash.scm megatest-version.scm
 
-rmt.scm client.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm
+rmt.scm client.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm megatest-version.scm
 
 common_records.scm : altdb.scm
 
 # mofiles/stml2.o : mofiles/cookie.o
 # configf.o : mofiles/commonmod.o
 
-vg.o dashboard.o : vg_records.scm
+vg.o dashboard.o : vg_records.scm megatest-version.scm
 
 dcommon.o : run_records.scm
 
 mofiles/stml2.o : mofiles/cookie.o
 
@@ -350,12 +348,16 @@
             $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil mtut	\
             tcmt readline-fix.scm serialize-env dboard *.o		\
             megatest-fossil-hash.* altdb.scm mofiles/*.o                \
             mofiles/*.o vg.o cookie.o dashboard-main.o	                \
             ducttape-lib.o ftail.o mutils.o pkts.o rmtmod.o stml2.o	\
-            tcmt.o
-	rm -f $(OFILES) $(GOFILES) $(MOFILES) $(TCMTOBJS) $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil mtut tcmt ftail.import.scm readline-fix.scm serialize-env dboard dboard.o megatest.o dashboard.o megatest-fossil-hash.* altdb.scm mofiles/*.o vg.o
+            tcmt.o *.import.scm *.import.o
+	rm -f $(OFILES) $(GOFILES) $(MOFILES) $(TCMTOBJS)		\
+            $(PREFIX)/megatest $(PREFIX)/dashboard mtest mtutil mtut	\
+            tcmt ftail.import.scm readline-fix.scm serialize-env	\
+            dboard dboard.o megatest.o dashboard.o			\
+            megatest-fossil-hash.* altdb.scm mofiles/*.o vg.o
 	rm -rf share
 
 #======================================================================
 # Make the records files
 #======================================================================
@@ -395,19 +397,19 @@
 	mkdir -p /tmp/$(USER)/datashare/disk1 /tmp/$(USER)/basepath
 
 xterm : sd
 	(export BASEPATH=/tmp/$(USER)/basepath ; export PATH="$(PWD)/datashare-testing:$(PATH)" ; xterm &)
 
-datashare-testing/spublish : spublish.scm $(OFILES)
-	csc $(CSCOPTS) spublish.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/spublish
+datashare-testing/spublish : spublish.scm $(OFILES) megatest-version.scm
+	csc $(CSCOPTS) spublish.scm margs.o process.o common.o  -o datashare-testing/spublish
 
-datashare-testing/sretrieve : sretrieve.scm $(OFILES)
-	csc $(CSCOPTS) sretrieve.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/sretrieve
+datashare-testing/sretrieve : sretrieve.scm $(OFILES) megatest-version.scm
+	csc $(CSCOPTS) sretrieve.scm margs.o process.o common.o  -o datashare-testing/sretrieve
 
 
-datashare-testing/sauthorize : sauthorize.scm $(OFILES)
-	 csc $(CSCOPTS) sauthorize.scm  megatest-version.o margs.o process.o common.o  -o datashare-testing/sauthorize
+datashare-testing/sauthorize : sauthorize.scm $(OFILES) megatest-version.scm
+	 csc $(CSCOPTS) sauthorize.scm margs.o process.o common.o  -o datashare-testing/sauthorize
 
 sauth-init:
 	mkdir -p  datashare-testing
 	rm  datashare-testing/sauthorize
 	rm  datashare-testing/sretrieve 
@@ -430,12 +432,12 @@
 	fi
 	if csi -ne '(use postgresql)';then \
 	   echo "(use postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\
 	fi
 
-portlogger-example : portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
-	csc $(CSCOPTS) portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o megatest-version.o mt.o ods.o portlogger.o process.o rmt.o rpc-transport.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
+portlogger-example : portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o mt.o ods.o portlogger.o process.o rmt.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
+	csc $(CSCOPTS) portlogger-example.scm api.o archive.o client.o common.o configf.o dashboard-tests.o dashboard-context-menu.o db.o dcommon.o ezsteps.o filedb.o genexample.o gutils.o http-transport.o items.o keys.o launch.o lock-queue.o margs.o mt.o ods.o portlogger.o process.o rmt.o runconfig.o runs.o sdb.o server.o synchash.o tasks.o tdb.o tests.o tree.o
 
 # create a pdf dot graphviz diagram from notations in rmt.scm
 rmt.pdf : rmt.scm
 	grep ';;DOT' rmt.scm | sed -e 's/.*;;DOT //' > rmt.dot;dot -Tpdf rmt.dot -o rmt.pdf
 

Index: common.scm
==================================================================
--- common.scm
+++ common.scm
@@ -26,12 +26,12 @@
      (prefix sqlite3 sqlite3:)
      pkts (prefix dbi dbi:)
      )
 
 (declare (unit common))
-(declare (uses commonmod))
-(import commonmod)
+;; (declare (uses commonmod))
+;; (import commonmod)
 
 (include "common_records.scm")
 
 
 ;; (require-library margs)

Index: megatest-version.scm
==================================================================
--- megatest-version.scm
+++ megatest-version.scm
@@ -16,8 +16,8 @@
 ;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
 
 ;; Always use two or four digit decimal
 ;; 1.01, 1.02...1.10,1.11,1.1101 ... 1.99,2.00..
 
-(declare (unit megatest-version))
+;; (declare (unit megatest-version))
 
 (define megatest-version 1.6564)

Index: megatest.scm
==================================================================
--- megatest.scm
+++ megatest.scm
@@ -39,12 +39,12 @@
 (declare (uses mt))
 (declare (uses api))
 (declare (uses tasks)) ;; only used for debugging.
 (declare (uses env))
 (declare (uses diff-report))
-(declare (uses ftail))
-(import ftail)
+;; (declare (uses ftail))
+;; (import ftail)
 
 (define *db* #f) ;; this is only for the repl, do not use in general!!!!
 
 (include "common_records.scm")
 (include "key_records.scm")

Index: sauthorize.scm
==================================================================
--- sauthorize.scm
+++ sauthorize.scm
@@ -26,12 +26,12 @@
 
 (use sql-de-lite srfi-1 posix regex regex-case srfi-69)
 ;(declare (uses common))
 ;(declare (uses configf))
 (declare (uses margs))
-(declare (uses megatest-version))
 
+(include "megatest-version.scm")
 (include "megatest-fossil-hash.scm")
 ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. 
 (include "sauth-paths.scm")
 (include "sauth-common.scm")
 

Index: spublish.scm
==================================================================
--- spublish.scm
+++ spublish.scm
@@ -26,13 +26,11 @@
 
 ;(declare (uses configf))
 ;; (declare (uses tree))
 (declare (uses margs))
 
-(declare (uses megatest-version))
-;; (declare (uses tbd))
-
+(include "megatest-version.scm")
 (include "megatest-fossil-hash.scm")
 ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. 
 (include "sauth-paths.scm")
 (include "sauth-common.scm")
 (define (toplevel-command . args) #f)

Index: sretrieve.scm
==================================================================
--- sretrieve.scm
+++ sretrieve.scm
@@ -24,13 +24,12 @@
 (use refdb)
 (use sql-de-lite srfi-1 posix regex regex-case srfi-69)
 ;(declare (uses common))
 ;(declare (uses configf))
 (declare (uses margs))
-(declare (uses megatest-version))
- 
 
+(include "megatest-version.scm")
 (include "megatest-fossil-hash.scm")
 ;;; please create this file before using sautherise. For sample file is avaliable sample-sauth-paths.scm. 
 (include "sauth-paths.scm")
 (include "sauth-common.scm")