diff --git a/src/sbbs3/addfiles.c b/src/sbbs3/addfiles.c
index d087ae9f6b3c068cd1d6e53f07b60475d0ac6659..090f3f3a1738d263baa15dfae838e847dcd7d84a 100644
--- a/src/sbbs3/addfiles.c
+++ b/src/sbbs3/addfiles.c
@@ -1,7 +1,5 @@
 /* Program to add files to a Synchronet file database */
 
-/* $Id: addfiles.c,v 1.63 2020/08/17 00:48:27 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,26 +13,21 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "nopen.h"
+#include "str_util.h"
+#include "datewrap.h"
+#include "date_str.h"
+#include "userdat.h"
+#include "filedat.h"
+#include "load_cfg.h"
 #include <stdbool.h>
+#include <stdarg.h>
 
 #define ADDFILES_VER "3.04"
 
@@ -600,7 +593,7 @@ void synclist(char *inpath, int dirnum)
 		printf("ERR_ALLOC %s\n",str);
 		return;
 	}
-	if(lread(file,ixbbuf,length)!=length) {
+	if(read(file,ixbbuf,length)!=length) {
 		close(file);
 		free((char *)ixbbuf);
 		printf("ERR_READ %s\n",str);
diff --git a/src/sbbs3/allusers.c b/src/sbbs3/allusers.c
index ef8d3525f15357d3303a9ceac27d4f5848b220dd..7ac0bdec2e8cbdccf02c48368a8188827770e7f2 100644
--- a/src/sbbs3/allusers.c
+++ b/src/sbbs3/allusers.c
@@ -1,5 +1,3 @@
-/* $Id: allusers.c,v 1.7 2018/02/20 11:56:26 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -13,21 +11,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -37,7 +23,8 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 
-#include "sbbs.h"
+#include "sbbsdefs.h"
+#include "str_util.h"
 
 int  min=0,max=99;
 long reqflags[4]={0},reqrest=0,reqexempt=0;
diff --git a/src/sbbs3/ars.c b/src/sbbs3/ars.c
index d03edddd557f28ffbce19795e5e698cc238ca55f..0acc14dd2346b343343cb63ef651eb208591312b 100644
--- a/src/sbbs3/ars.c
+++ b/src/sbbs3/ars.c
@@ -1,9 +1,5 @@
-/* ars.c */
-
 /* Synchronet Access Requirement String (ARS) functions */
 
-/* $Id: ars.c,v 1.24 2020/05/14 07:49:58 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,13 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "ars_defs.h"
 
 static BOOL ar_string_arg(int artype)
 {
diff --git a/src/sbbs3/dat_rec.c b/src/sbbs3/dat_rec.c
index b8ccaf78a08d6b4e7c57ba847c292eb703d9000e..c9859704282f2257cfe33f96c71168394d801cdc 100644
--- a/src/sbbs3/dat_rec.c
+++ b/src/sbbs3/dat_rec.c
@@ -1,9 +1,5 @@
-/* dat_rec.c */
-
 /* Synchronet text data-related routines (exported) */
 
-/* $Id: dat_rec.c,v 1.3 2018/02/20 11:56:26 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,15 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "dat_rec.h"
+#include "gen_defs.h"
+#include <string.h>
 
 /****************************************************************************/
 /* Places into 'strout' CR or ETX terminated string starting at             */
diff --git a/src/sbbs3/date_str.c b/src/sbbs3/date_str.c
index c2f2b4d38422e8678c18ce410ad51858017c8049..4da3fc1a2e80fc47748825e9f1072ab98c7fbcdc 100644
--- a/src/sbbs3/date_str.c
+++ b/src/sbbs3/date_str.c
@@ -1,9 +1,5 @@
-/* date_str.c */
-
 /* Synchronet date/time string conversion routines */
 
-/* $Id: date_str.c,v 1.29 2016/05/27 07:44:46 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,14 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "date_str.h"
+#include "datewrap.h"
 
 const char *wday[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
 const char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
diff --git a/src/sbbs3/date_str.h b/src/sbbs3/date_str.h
new file mode 100644
index 0000000000000000000000000000000000000000..013d0eede4a1d38ad8dcd8ccf445080a9545d69b
--- /dev/null
+++ b/src/sbbs3/date_str.h
@@ -0,0 +1,46 @@
+/* Synchronet date/time string conversion routines */
+
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _DATE_STR_H_
+#define _DATE_STR_H_
+
+#include "scfgdefs.h"	// scfg_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const char* wday[];	/* abbreviated weekday names */
+extern const char* mon[];	/* abbreviated month names */
+
+DLLEXPORT char *	zonestr(short zone);
+DLLEXPORT time32_t	dstrtounix(scfg_t*, const char *str);
+DLLEXPORT char *	unixtodstr(scfg_t*, time32_t, char *str);
+DLLEXPORT char *	sectostr(uint sec, char *str);
+DLLEXPORT char *	seconds_to_str(uint, char*);
+DLLEXPORT char *	hhmmtostr(scfg_t* cfg, struct tm* tm, char* str);
+DLLEXPORT char *	timestr(scfg_t* cfg, time32_t intime, char* str);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/delfiles.c b/src/sbbs3/delfiles.c
index 0aa828d7e546d636a9cc2f7d07a25e1e8c4b0373..c38e8fad6d8bee4ae8d6d89da82f41d8a7c7e05b 100644
--- a/src/sbbs3/delfiles.c
+++ b/src/sbbs3/delfiles.c
@@ -1,9 +1,5 @@
-/* delfiles.c */
-
 /* Program to delete expired files from a Synchronet file database */
 
-/* $Id: delfiles.c,v 1.14 2020/08/17 00:48:28 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,18 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "scfgdefs.h"
+#include "load_cfg.h"
+#include "filedat.h"
+#include "nopen.h"
+#include "str_util.h"
+#include <stdarg.h>
 
 #define DELFILES_VER "1.01"
 
diff --git a/src/sbbs3/dllexport.h b/src/sbbs3/dllexport.h
new file mode 100644
index 0000000000000000000000000000000000000000..5308120b5395152b25828da774bb853f3391936f
--- /dev/null
+++ b/src/sbbs3/dllexport.h
@@ -0,0 +1,13 @@
+#ifdef DLLEXPORT
+#undef DLLEXPORT
+#endif
+#if defined(_WIN32) && ! defined(__MINGW32__)
+	#ifdef SBBS_EXPORTS
+		#define DLLEXPORT	__declspec(dllexport)
+	#else
+		#define DLLEXPORT	__declspec(dllimport)
+	#endif
+#endif
+#ifndef DLLEXPORT
+#define DLLEXPORT
+#endif
diff --git a/src/sbbs3/dstsedit.c b/src/sbbs3/dstsedit.c
index 18fc8a2785c179497752f2346a001923e6fbdb0f..3e3c4b53ac26eb06f3806cfc066f80a8eaba99d7 100644
--- a/src/sbbs3/dstsedit.c
+++ b/src/sbbs3/dstsedit.c
@@ -37,11 +37,12 @@
 #include <errno.h>
 #include <stdlib.h>
 
-#include "sbbs.h"
+#include "str_util.h"
 #include "dirwrap.h"
 #include "nopen.h"
-#include "sbbsdefs.h"
+#include "scfgdefs.h"
 #include "conwrap.h"
+#include "date_str.h"
 
 int 
 main(int argc, char **argv)
diff --git a/src/sbbs3/dupefind.c b/src/sbbs3/dupefind.c
index 61cf7ef0aa66718fdd6aebe2dba0323dae22bbb5..554436aace2c734077e1164dfca38c1963396327 100644
--- a/src/sbbs3/dupefind.c
+++ b/src/sbbs3/dupefind.c
@@ -1,8 +1,28 @@
-/* $Id: dupefind.c,v 1.8 2020/08/17 00:48:28 rswindell Exp $ */
-// vi: tabstop=4
-
-#include "sbbs.h"
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#include "scfgdefs.h"
+#include "str_util.h"
+#include "load_cfg.h"
+#include "nopen.h"
 #include "crc32.h"
+#include <stdarg.h>
 
 #define DUPEFIND_VER "1.02"
 
diff --git a/src/sbbs3/echocfg.c b/src/sbbs3/echocfg.c
index e491e5395fd13c833029c75c5f63f07ceb51db5f..ec7e8e3ce45a8df128a9800b832da14d2f5927ba 100644
--- a/src/sbbs3/echocfg.c
+++ b/src/sbbs3/echocfg.c
@@ -1,7 +1,5 @@
 /* FidoNet configuration utility 											*/
 
-/* $Id: echocfg.c,v 3.58 2020/08/17 00:48:28 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -45,8 +31,10 @@
 #define __COLORS
 #include "ciolib.h"
 #include "uifc.h"
-#include "sbbs.h"
+#include "scfgdefs.h"
 #include "sbbsecho.h"
+#include "sockwrap.h"
+#include "str_util.h"
 
 char **opt;
 
diff --git a/src/sbbs3/filedat.c b/src/sbbs3/filedat.c
index a47c1cc5ac4f683e30346272043ebf93a0466c61..11f8e7625e84604e856ec43d6c15ad179b965e65 100644
--- a/src/sbbs3/filedat.c
+++ b/src/sbbs3/filedat.c
@@ -1,9 +1,5 @@
-/* filedat.c */
-
 /* Synchronet file database-related exported functions */
 
-/* $Id: filedat.c,v 1.40 2019/01/12 08:11:13 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,19 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "filedat.h"
+#include "dat_rec.h"
+#include "datewrap.h"	// time32()
+#include "str_util.h"
+#include "nopen.h"
+
+static char* crlf = "\r\n";
 
 /****************************************************************************/
 /* Gets filedata from dircode.DAT file										*/
@@ -246,7 +236,7 @@ BOOL DLLCALL addfiledat(scfg_t* cfg, file_t* f)
 			close(file);
 			return(FALSE); 
 		}
-		if(lread(file,ixbbuf,length)!=length) {
+		if(read(file,ixbbuf,length)!=length) {
 			close(file);
 			free(ixbbuf);
 			return(FALSE); 
@@ -293,7 +283,7 @@ BOOL DLLCALL addfiledat(scfg_t* cfg, file_t* f)
 		}
 		write(file,&f->dateuled,4);
 		write(file,&f->datedled,4);              /* Write 0 for datedled */
-		if(lwrite(file,&ixbbuf[l],length-l)!=length-l) { /* Write rest of IXB */
+		if(write(file,&ixbbuf[l],length-l)!=length-l) { /* Write rest of IXB */
 			close(file);
 			free(ixbbuf);
 			return(FALSE); 
@@ -342,7 +332,7 @@ BOOL DLLCALL getfileixb(scfg_t* cfg, file_t* f)
 		close(file);
 		return(FALSE); 
 	}
-	if(lread(file,ixbbuf,length)!=length) {
+	if(read(file,ixbbuf,length)!=length) {
 		close(file);
 		free(ixbbuf);
 		return(FALSE); 
@@ -393,7 +383,7 @@ BOOL DLLCALL putfileixb(scfg_t* cfg, file_t* f)
 		close(file);
 		return(FALSE); 
 	}
-	if(lread(file,ixbbuf,length)!=length) {
+	if(read(file,ixbbuf,length)!=length) {
 		close(file);
 		free(ixbbuf);
 		return(FALSE); 
@@ -449,7 +439,7 @@ BOOL DLLCALL removefiledat(scfg_t* cfg, file_t* f)
 		close(file);
 		return(FALSE); 
 	}
-	if(lread(file,ixbbuf,length)!=length) {
+	if(read(file,ixbbuf,length)!=length) {
 		close(file);
 		free(ixbbuf);
 		return(FALSE); 
@@ -464,7 +454,7 @@ BOOL DLLCALL removefiledat(scfg_t* cfg, file_t* f)
 			ixbname[i]=ixbbuf[l+i];
 		ixbname[i]=0;
 		if(stricmp(ixbname,fname))
-			if(lwrite(file,&ixbbuf[l],F_IXBSIZE)!=F_IXBSIZE) {
+			if(write(file,&ixbbuf[l],F_IXBSIZE)!=F_IXBSIZE) {
 				close(file);
 				free(ixbbuf);
 				return(FALSE); 
@@ -514,7 +504,7 @@ BOOL DLLCALL findfile(scfg_t* cfg, uint dirnum, char *filename)
 		close(file);
 		return(FALSE); 
 	}
-	if(lread(file,ixbbuf,length)!=length) {
+	if(read(file,ixbbuf,length)!=length) {
 		close(file);
 		free(ixbbuf);
 		return(FALSE); 
diff --git a/src/sbbs3/filedat.h b/src/sbbs3/filedat.h
new file mode 100644
index 0000000000000000000000000000000000000000..67f3d3e8372b044b45a628860a4613dfb2cb3bae
--- /dev/null
+++ b/src/sbbs3/filedat.h
@@ -0,0 +1,52 @@
+/* Synchronet Filebase Access functions */
+
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _FILEDAT_H_
+#define _FILEDAT_H_
+
+#include "scfgdefs.h"	// scfg_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT BOOL		getfileixb(scfg_t* cfg, file_t* f);
+DLLEXPORT BOOL		putfileixb(scfg_t* cfg, file_t* f);
+DLLEXPORT BOOL		getfiledat(scfg_t* cfg, file_t* f);
+DLLEXPORT BOOL		putfiledat(scfg_t* cfg, file_t* f);
+DLLEXPORT void		putextdesc(scfg_t* cfg, uint dirnum, ulong datoffset, char *ext);
+DLLEXPORT void		getextdesc(scfg_t* cfg, uint dirnum, ulong datoffset, char *ext);
+DLLEXPORT char*		getfilepath(scfg_t* cfg, file_t* f, char* path);
+
+DLLEXPORT BOOL		removefiledat(scfg_t* cfg, file_t* f);
+DLLEXPORT BOOL		addfiledat(scfg_t* cfg, file_t* f);
+DLLEXPORT BOOL		findfile(scfg_t* cfg, uint dirnum, char *filename);
+DLLEXPORT char *	padfname(const char *filename, char *str);
+DLLEXPORT char *	unpadfname(const char *filename, char *str);
+DLLEXPORT BOOL		rmuserxfers(scfg_t* cfg, int fromuser, int destuser, char *fname);
+
+DLLEXPORT int		update_uldate(scfg_t* cfg, file_t* f);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/filelist.c b/src/sbbs3/filelist.c
index dfed141029ccabcf8339bb54faf0c8069ca7bd79..ee1a762714b9ef832929b37c8d5046fa2e5b83f9 100644
--- a/src/sbbs3/filelist.c
+++ b/src/sbbs3/filelist.c
@@ -1,11 +1,7 @@
-/* filelist.c */
-
 /* Utility to create list of files from Synchronet file directories */
 /* Default list format is FILES.BBS, but file size, uploader, upload date */
 /* and other information can be included. */
 
-/* $Id: filelist.c,v 1.22 2020/08/17 00:48:28 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -19,25 +15,20 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "datewrap.h"
+#include "load_cfg.h"
+#include "str_util.h"
+#include "date_str.h"
+#include "nopen.h"
+#include "filedat.h"
+#include "dat_rec.h"
+#include <stdarg.h>
 
 #define FILELIST_VER "3.15"
 
diff --git a/src/sbbs3/getmail.c b/src/sbbs3/getmail.c
index fbd45802399e838ee2d5e99cea2362e97036dee6..a38d14390688dadd0182a0a5ad999cf1d4c8af9b 100644
--- a/src/sbbs3/getmail.c
+++ b/src/sbbs3/getmail.c
@@ -1,7 +1,5 @@
 /* Synchronet DLL-exported mail-related routines */
 
-/* $Id: getmail.c,v 1.20 2018/12/30 04:33:48 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,13 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "getmail.h"
 
 /****************************************************************************/
 /* Returns the number of pieces of mail waiting for usernumber              */
diff --git a/src/sbbs3/getmail.h b/src/sbbs3/getmail.h
new file mode 100644
index 0000000000000000000000000000000000000000..949db78e9d9144527fa0cf72926c3950591e7b3c
--- /dev/null
+++ b/src/sbbs3/getmail.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _GETMAIL_H_
+#define _GETMAIL_H_
+
+#include "scfgdefs.h"
+#include "smblib.h"
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT int		getmail(scfg_t* cfg, int usernumber, BOOL sent, uint16_t attr);
+DLLEXPORT mail_t *	loadmail(smb_t* smb, uint32_t* msgs, uint usernumber
+							,int which, long mode);
+DLLEXPORT void		freemail(mail_t* mail);
+DLLEXPORT BOOL		delfattach(scfg_t*, smbmsg_t*);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/getstats.h b/src/sbbs3/getstats.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b8a5ddb23b08f80733606c1097f3b3e6848860d
--- /dev/null
+++ b/src/sbbs3/getstats.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _GETSTATS_H_
+#define _GETSTATS_H_
+
+#include "scfgdefs.h"	// scfg_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT BOOL		getstats(scfg_t* cfg, char node, stats_t* stats);
+DLLEXPORT ulong		getposts(scfg_t* cfg, uint subnum);
+DLLEXPORT long		getfiles(scfg_t* cfg, uint dirnum);
+DLLEXPORT BOOL		inc_sys_upload_stats(scfg_t*, ulong files, ulong bytes);
+DLLEXPORT BOOL		inc_sys_download_stats(scfg_t*, ulong files, ulong bytes);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/load_cfg.c b/src/sbbs3/load_cfg.c
index 1c6ced9ba6200d84b9f8d6cd373c89dd6e6a8cc1..d9e10f09f10427ec8f01465a9d676a09d85294b3 100644
--- a/src/sbbs3/load_cfg.c
+++ b/src/sbbs3/load_cfg.c
@@ -1,7 +1,5 @@
 /* Synchronet configuration load routines (exported) */
 
-/* $Id: load_cfg.c,v 1.82 2020/05/26 01:49:22 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,17 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "load_cfg.h"
+#include "scfglib.h"
+#include "str_util.h"
+#include "nopen.h"
+#include "datewrap.h"
 #include "text.h"	/* TOTAL_TEXT */
 #ifdef USE_CRYPTLIB
 #include "cryptlib.h"
@@ -44,6 +34,9 @@ static void free_attr_cfg(scfg_t* cfg);
 
 int 	lprintf(int level, const char *fmt, ...);	/* log output */
 
+/* readtext.c */
+char *	readtext(long *line, FILE *stream, long dflt);
+
 /****************************************************************************/
 /* Initializes system and node configuration information and data variables */
 /****************************************************************************/
diff --git a/src/sbbs3/load_cfg.h b/src/sbbs3/load_cfg.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f36380c650ace0ca3f631ddb7da4603f03670fc
--- /dev/null
+++ b/src/sbbs3/load_cfg.h
@@ -0,0 +1,43 @@
+/* Synchronet Configuration Load/Preparation functions */
+
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _LOAD_CFG_H_
+#define _LOAD_CFG_H_
+
+#include "scfgdefs.h"	// scfg_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT BOOL		load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error);
+DLLEXPORT void		free_cfg(scfg_t* cfg);
+DLLEXPORT void		free_text(char* text[]);
+DLLEXPORT ushort	sys_timezone(scfg_t* cfg);
+DLLEXPORT char *	prep_dir(const char* base, char* dir, size_t buflen);
+DLLEXPORT char *	prep_code(char *str, const char* prefix);
+DLLEXPORT int 		md(const char *path);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/makeuser.c b/src/sbbs3/makeuser.c
index d9c244483fc0546efe087b761ab802313c678068..14274aaf288a3fc3537c34fc1b8c102a44de6ea8 100644
--- a/src/sbbs3/makeuser.c
+++ b/src/sbbs3/makeuser.c
@@ -1,9 +1,5 @@
-/* makeuser.c */
-
 /* Program to add a user to a Synchronet user database */
 
-/* $Id: makeuser.c,v 1.12 2020/08/17 00:48:28 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,17 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "load_cfg.h"
+#include "str_util.h"
+#include "userdat.h"
+#include "scfglib.h"
+#include <stdarg.h>
 
 scfg_t scfg;
 
diff --git a/src/sbbs3/msg_id.c b/src/sbbs3/msg_id.c
index 0e22c0683d22128b4d9a5857b1659f8ace5bbbd6..26a5ad216f71fae427d8f7a1c3eeb90356dd9702 100644
--- a/src/sbbs3/msg_id.c
+++ b/src/sbbs3/msg_id.c
@@ -1,7 +1,5 @@
 /* Synchronet Message-ID generation routines */
 
-/* $Id: msg_id.c,v 1.16 2020/07/15 06:12:56 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,14 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "msg_id.h"
+#include "smblib.h"
 
 static ulong msg_number(smbmsg_t* msg)
 {
diff --git a/src/sbbs3/msg_id.h b/src/sbbs3/msg_id.h
new file mode 100644
index 0000000000000000000000000000000000000000..8de3cf614bb8eaf2d7c90b59ce857f04557f2d92
--- /dev/null
+++ b/src/sbbs3/msg_id.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _MSG_ID_H_
+#define _MSG_ID_H_
+
+#include "smbdefs.h"
+#include "scfgdefs.h"
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT char *	ftn_msgid(sub_t*, smbmsg_t*, char* msgid, size_t);
+DLLEXPORT char *	get_msgid(scfg_t*, uint subnum, smbmsg_t*, char* msgid, size_t);
+DLLEXPORT char *	get_replyid(scfg_t*, smb_t*, smbmsg_t*, char* msgid, size_t maxlen);
+DLLEXPORT uint32_t	get_new_msg_number(smb_t*);
+DLLEXPORT BOOL		add_msg_ids(scfg_t*, smb_t*, smbmsg_t*, smbmsg_t* remsg);
+DLLEXPORT BOOL		add_reply_ids(scfg_t*, smb_t*, smbmsg_t*, smbmsg_t* remsg);
+DLLEXPORT char*		msg_program_id(char* pid, size_t);
+DLLEXPORT uint		nearest_sysfaddr(scfg_t*, faddr_t* dest_addr);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
diff --git a/src/sbbs3/msgdate.c b/src/sbbs3/msgdate.c
index 34a2028455d0d3c8b9718260e22679ad973328c2..d2ce64393360465980e88f7a2fff8f1727bb3e45 100644
--- a/src/sbbs3/msgdate.c
+++ b/src/sbbs3/msgdate.c
@@ -1,9 +1,5 @@
-/* msgdate.c */
-
 /* Synchronet RFC822 message date/time string conversion routines */
 
-/* $Id: msgdate.c,v 1.7 2018/07/24 11:37:38 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,25 +13,16 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "msgdate.h"
+#include "smblib.h"
+#include "datewrap.h"
+#include "date_str.h"
 
 /****************************************************************************/
 /* Convert when_t structure to RFC822 date header field (string)			*/
diff --git a/src/sbbs3/msgdate.h b/src/sbbs3/msgdate.h
new file mode 100644
index 0000000000000000000000000000000000000000..5df0564ff41b09bfa76eb1d8edaa95ad906ec973
--- /dev/null
+++ b/src/sbbs3/msgdate.h
@@ -0,0 +1,41 @@
+/* Synchronet RFC822 message date/time string conversion routines */
+
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _MSGDATE_H_
+#define _MSGDATE_H_
+
+#include <time.h>		// time_t
+#include "scfgdefs.h"	// scfg_t
+#include "smbdefs.h"	// when_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT when_t	rfc822date(char* p);
+DLLEXPORT char *	msgdate(when_t when, char* buf);
+DLLEXPORT BOOL		newmsgs(smb_t*, time_t);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/nopen.c b/src/sbbs3/nopen.c
index b712188b0e47c34fafca30465c42eb2363445403..17b10664d1a3c864e61d4f0bd87be54697d44e6f 100644
--- a/src/sbbs3/nopen.c
+++ b/src/sbbs3/nopen.c
@@ -1,9 +1,5 @@
-/* nopen.c */
-
 /* Network open functions (nopen and fnopen) and friends */
 
-/* $Id: nopen.c,v 1.30 2018/11/23 17:08:42 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,26 +13,15 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
-#include "crc32.h"
+#include "filewrap.h"
+#include "sockwrap.h"
+#include "sbbsdefs.h"
 
 /****************************************************************************/
 /* Network open function. Opens all files DENYALL, DENYWRITE, or DENYNONE	*/
diff --git a/src/sbbs3/qwknodes.c b/src/sbbs3/qwknodes.c
index de128146e4a94ded3aa192c0b01d6f21c80be4d2..1532403201e3112133d26f73e03cdd813f88f912 100644
--- a/src/sbbs3/qwknodes.c
+++ b/src/sbbs3/qwknodes.c
@@ -1,5 +1,3 @@
-/* $Id: qwknodes.c,v 1.25 2020/08/17 00:48:28 rswindell Exp $ */
-
 /* Synchronet QWKnet node list or route.dat file generator */
 
 /****************************************************************************
@@ -15,29 +13,21 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "load_cfg.h"
+#include "str_util.h"
+#include "date_str.h"
+#include "smblib.h"
 #include "nopen.h"
 #include "crc16.h"
 #include "crc32.h"
 #include "conwrap.h"	/* kbhit */
+#include <stdarg.h>
 
 unsigned _stklen=10000;
 smb_t		smb;
diff --git a/src/sbbs3/rechocfg.c b/src/sbbs3/rechocfg.c
index 08b680453963d99c97461a1d197d1cc8adeb9980..19079bf54f8f0c800b4f74ee39ab16a7f4170199 100644
--- a/src/sbbs3/rechocfg.c
+++ b/src/sbbs3/rechocfg.c
@@ -1,7 +1,5 @@
 /* Synchronet FidoNet EchoMail Scanning/Tossing and NetMail Tossing Utility */
 
-/* $Id: rechocfg.c,v 3.48 2020/05/04 03:14:51 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -45,9 +31,9 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include "sbbs.h"
 #include "sbbsecho.h"
 #include "filewrap.h"	/* O_DENYNONE */
+#include "nopen.h"		/* backup() */
 
 /****************************************************************************/
 /* Returns the FidoNet address kept in str as ASCII.                        */
diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h
index 3a4d24f1757e3ad412dd8e7ce7bfd9e12c959ebc..82385ab19992ab4c0b6d5a8287253336f53dafbe 100644
--- a/src/sbbs3/sbbs.h
+++ b/src/sbbs3/sbbs.h
@@ -290,8 +290,8 @@ extern int	thread_suid_broken;			/* NPTL is no longer broken */
 
 #include "smblib.h"
 #include "ars_defs.h"
-#include "scfgdefs.h"
 #include "scfglib.h"
+#include "scfgsave.h"
 #include "userdat.h"
 #include "riodefs.h"
 #include "cmdshell.h"
@@ -302,6 +302,14 @@ extern int	thread_suid_broken;			/* NPTL is no longer broken */
 #include "telnet.h"
 #include "nopen.h"
 #include "text.h"
+#include "str_util.h"
+#include "date_str.h"
+#include "load_cfg.h"
+#include "filedat.h"
+#include "getstats.h"
+#include "msgdate.h"
+#include "getmail.h"
+#include "msg_id.h"
 
 /* Synchronet Node Instance class definition */
 #if defined(__cplusplus) && defined(JAVASCRIPT)
@@ -1167,20 +1175,6 @@ extern "C" {
 	DLLEXPORT int		DLLCALL sbbs_random(int);
 	DLLEXPORT void		DLLCALL sbbs_srand(void);
 
-	/* getstats.c */
-	DLLEXPORT BOOL		DLLCALL getstats(scfg_t* cfg, char node, stats_t* stats);
-	DLLEXPORT ulong		DLLCALL	getposts(scfg_t* cfg, uint subnum);
-	DLLEXPORT long		DLLCALL getfiles(scfg_t* cfg, uint dirnum);
-	DLLEXPORT BOOL		DLLCALL inc_sys_upload_stats(scfg_t*, ulong files, ulong bytes);
-	DLLEXPORT BOOL		DLLCALL inc_sys_download_stats(scfg_t*, ulong files, ulong bytes);
-
-	/* getmail.c */
-	DLLEXPORT int		DLLCALL getmail(scfg_t* cfg, int usernumber, BOOL sent, uint16_t attr);
-	DLLEXPORT mail_t *	DLLCALL loadmail(smb_t* smb, uint32_t* msgs, uint usernumber
-										,int which, long mode);
-	DLLEXPORT void		DLLCALL freemail(mail_t* mail);
-	DLLEXPORT BOOL		DLLCALL delfattach(scfg_t*, smbmsg_t*);
-
 	/* postmsg.cpp */
 	DLLEXPORT int		DLLCALL savemsg(scfg_t*, smb_t*, smbmsg_t*, client_t*, const char* server, char* msgbuf, smbmsg_t* remsg);
 	DLLEXPORT int		DLLCALL votemsg(scfg_t*, smb_t*, smbmsg_t*, const char* msgfmt, const char* votefmt);
@@ -1190,101 +1184,6 @@ extern "C" {
 	DLLEXPORT int		DLLCALL msg_client_hfields(smbmsg_t*, client_t*);
 	DLLEXPORT int		DLLCALL notify(scfg_t*, uint usernumber, const char* subject, const char* msg);
 
-	/* filedat.c */
-	DLLEXPORT BOOL		DLLCALL getfileixb(scfg_t* cfg, file_t* f);
-	DLLEXPORT BOOL		DLLCALL putfileixb(scfg_t* cfg, file_t* f);
-	DLLEXPORT BOOL		DLLCALL getfiledat(scfg_t* cfg, file_t* f);
-	DLLEXPORT BOOL		DLLCALL putfiledat(scfg_t* cfg, file_t* f);
-	DLLEXPORT void		DLLCALL putextdesc(scfg_t* cfg, uint dirnum, ulong datoffset, char *ext);
-	DLLEXPORT void		DLLCALL getextdesc(scfg_t* cfg, uint dirnum, ulong datoffset, char *ext);
-	DLLEXPORT char*		DLLCALL getfilepath(scfg_t* cfg, file_t* f, char* path);
-
-	DLLEXPORT BOOL		DLLCALL removefiledat(scfg_t* cfg, file_t* f);
-	DLLEXPORT BOOL		DLLCALL addfiledat(scfg_t* cfg, file_t* f);
-	DLLEXPORT BOOL		DLLCALL findfile(scfg_t* cfg, uint dirnum, char *filename);
-	DLLEXPORT char *	DLLCALL padfname(const char *filename, char *str);
-	DLLEXPORT char *	DLLCALL unpadfname(const char *filename, char *str);
-	DLLEXPORT BOOL		DLLCALL rmuserxfers(scfg_t* cfg, int fromuser, int destuser, char *fname);
-
-	DLLEXPORT int		DLLCALL update_uldate(scfg_t* cfg, file_t* f);
-
-	/* str_util.c */
-	DLLEXPORT char *	remove_ctrl_a(const char* instr, char* outstr);
-	DLLEXPORT char 		ctrl_a_to_ascii_char(char code);
-	DLLEXPORT char *	truncstr(char* str, const char* set);
-	DLLEXPORT char *	ascii_str(uchar* str);
-	DLLEXPORT char *	condense_whitespace(char* str);
-	DLLEXPORT char		exascii_to_ascii_char(uchar ch);
-	DLLEXPORT BOOL		findstr(const char *insearch, const char *fname);
-	DLLEXPORT BOOL		findstr_in_string(const char* insearchof, char* string);
-	DLLEXPORT BOOL		findstr_in_list(const char* insearchof, str_list_t list);
-	DLLEXPORT str_list_t findstr_list(const char* fname);
-	DLLEXPORT BOOL		trashcan(scfg_t* cfg, const char *insearch, const char *name);
-	DLLEXPORT char *	trashcan_fname(scfg_t* cfg, const char *name, char* fname, size_t);
-	DLLEXPORT str_list_t trashcan_list(scfg_t* cfg, const char* name);
-	DLLEXPORT char *	strip_ansi(char* str);
-	DLLEXPORT char *	strip_exascii(const char *str, char* dest);
-	DLLEXPORT char *	strip_space(const char *str, char* dest);
-	DLLEXPORT char *	prep_file_desc(const char *str, char* dest);
-	DLLEXPORT char *	strip_ctrl(const char *str, char* dest);
-	DLLEXPORT char *	strip_char(const char* str, char* dest, char);
-	DLLEXPORT char *	net_addr(net_t* net);
-	DLLEXPORT BOOL		valid_ctrl_a_attr(char a);
-	DLLEXPORT BOOL		valid_ctrl_a_code(char a);
-	DLLEXPORT size_t	strip_invalid_attr(char *str);
-	DLLEXPORT char *	ultoac(ulong l,char *str);
-	DLLEXPORT char *	rot13(char* str);
-	DLLEXPORT uint32_t	str_to_bits(uint32_t currval, const char *str);
-	DLLEXPORT BOOL		str_has_ctrl(const char*);
-	DLLEXPORT BOOL		str_is_ascii(const char*);
-	DLLEXPORT char *	utf8_to_cp437_str(char* str);
-	DLLEXPORT char *	subnewsgroupname(scfg_t*, sub_t*, char*, size_t);
-	DLLEXPORT char * 	get_ctrl_dir(BOOL warn);
-
-	/* msg_id.c */
-	DLLEXPORT char *	DLLCALL ftn_msgid(sub_t*, smbmsg_t*, char* msgid, size_t);
-	DLLEXPORT char *	DLLCALL get_msgid(scfg_t*, uint subnum, smbmsg_t*, char* msgid, size_t);
-	DLLEXPORT char *	DLLCALL get_replyid(scfg_t*, smb_t*, smbmsg_t*, char* msgid, size_t maxlen);
-	DLLEXPORT uint32_t	DLLCALL get_new_msg_number(smb_t*);
-	DLLEXPORT BOOL		DLLCALL add_msg_ids(scfg_t*, smb_t*, smbmsg_t*, smbmsg_t* remsg);
-	DLLEXPORT BOOL		DLLCALL add_reply_ids(scfg_t*, smb_t*, smbmsg_t*, smbmsg_t* remsg);
-	DLLEXPORT char*		DLLCALL msg_program_id(char* pid, size_t);
-	DLLEXPORT uint		nearest_sysfaddr(scfg_t*, faddr_t* dest_addr);
-
-	/* date_str.c */
-	DLLEXPORT char *	DLLCALL zonestr(short zone);
-	DLLEXPORT time32_t	DLLCALL dstrtounix(scfg_t*, const char *str);
-	DLLEXPORT char *	DLLCALL unixtodstr(scfg_t*, time32_t, char *str);
-	DLLEXPORT char *	DLLCALL sectostr(uint sec, char *str);
-	DLLEXPORT char *	DLLCALL seconds_to_str(uint, char*);
-	DLLEXPORT char *	DLLCALL hhmmtostr(scfg_t* cfg, struct tm* tm, char* str);
-	DLLEXPORT char *	DLLCALL timestr(scfg_t* cfg, time32_t intime, char* str);
-
-	/* msgdate.c */
-	DLLEXPORT when_t	DLLCALL rfc822date(char* p);
-	DLLEXPORT char *	DLLCALL msgdate(when_t when, char* buf);
-	DLLEXPORT BOOL		DLLCALL newmsgs(smb_t*, time_t);
-
-	/* load_cfg.c */
-	DLLEXPORT BOOL		DLLCALL load_cfg(scfg_t* cfg, char* text[], BOOL prep, char* error);
-	DLLEXPORT void		DLLCALL free_cfg(scfg_t* cfg);
-	DLLEXPORT void		DLLCALL free_text(char* text[]);
-	DLLEXPORT ushort	DLLCALL sys_timezone(scfg_t* cfg);
-	DLLEXPORT char *	DLLCALL prep_dir(const char* base, char* dir, size_t buflen);
-	DLLEXPORT int 		DLLCALL md(const char *path);
-
-	/* scfgsave.c */
-	DLLEXPORT BOOL		DLLCALL save_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_node_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_main_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_msgs_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_file_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_chat_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT BOOL		DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level);
-	DLLEXPORT void		DLLCALL refresh_cfg(scfg_t* cfg);
-	DLLEXPORT int		DLLCALL smb_storage_mode(scfg_t*, smb_t*);
-	DLLEXPORT int		DLLCALL smb_open_sub(scfg_t*, smb_t*, unsigned int subnum);
-
 	/* logfile.cpp */
 	DLLEXPORT int		DLLCALL errorlog(scfg_t* cfg, int level, const char* host, const char* text);
 
@@ -1506,17 +1405,6 @@ extern "C" {
 
 #endif
 
-/* str_util.c */
-char*	backslashcolon(char *str);
-ulong	ahtoul(const char *str);	/* Converts ASCII hex to ulong */
-char *	hexplus(uint num, char *str); 	/* Hex plus for 3 digits up to 9000 */
-uint	hptoi(const char *str);
-int		pstrcmp(const char **str1, const char **str2);  /* Compares pointers to pointers */
-int		strsame(const char *str1, const char *str2);	/* Compares number of same chars */
-
-/* load_cfg.c */
-char*	prep_code(char *str, const char* prefix);
-
 #ifdef SBBS /* These aren't exported */
 
 	/* main.c */
@@ -1553,8 +1441,6 @@ char*	prep_code(char *str, const char* prefix);
 
 #endif /* SBBS */
 
-extern const char* wday[];	/* abbreviated weekday names */
-extern const char* mon[];	/* abbreviated month names */
 extern char lastuseron[LEN_ALIAS+1];  /* Name of user last online */
 
 #ifdef __cplusplus
diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c
index cf8236dab33295c03a5eb7391af59b90283499b5..83ee49abc685ba263123500d9c0383467c5180d7 100644
--- a/src/sbbs3/sbbsecho.c
+++ b/src/sbbs3/sbbsecho.c
@@ -1,8 +1,5 @@
 /* Synchronet FidoNet EchoMail Scanning/Tossing and NetMail Tossing Utility */
 
-/* $Id: sbbsecho.c,v 3.177 2020/08/17 00:48:28 rswindell Exp $ */
-// vi: tabstop=4
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -16,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -50,14 +35,24 @@
 #endif
 
 #include "conwrap.h"		/* getch() */
-#include "sbbs.h"			/* load_cfg() */
-#include "sbbsdefs.h"
+#include "load_cfg.h"		/* load_cfg() */
 #include "smblib.h"
 #include "scfglib.h"
 #include "sbbsecho.h"
 #include "genwrap.h"		/* PLATFORM_DESC */
 #include "xpendian.h"
 #include "utf8.h"
+#include "date_str.h"
+#include "link_list.h"
+#include "str_list.h"
+#include "str_util.h"
+#include "datewrap.h"
+#include "nopen.h"
+#include "crc32.h"
+#include "userdat.h"
+#include "msg_id.h"
+#include "scfgsave.h"
+#include "getmail.h"
 
 #define MAX_OPEN_SMBS	10
 
diff --git a/src/sbbs3/sbbsecho.h b/src/sbbs3/sbbsecho.h
index 67225008307ffa37f5dc31f725895630513ca4ae..a90892d18a08cf200748ce335c13e3f6519a779e 100644
--- a/src/sbbs3/sbbsecho.h
+++ b/src/sbbs3/sbbsecho.h
@@ -1,7 +1,5 @@
 /* Synchronet FidoNet EchoMail tosser/scanner/areafix program */
 
-/* $Id: sbbsecho.h,v 3.42 2020/06/12 13:00:35 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -40,6 +26,7 @@
 #include <smbdefs.h>
 #include "sbbsdefs.h"
 #include "fidodefs.h"
+#include "ini_file.h"
 
 #define SBBSECHO_VERSION_MAJOR		3
 #define SBBSECHO_VERSION_MINOR		11
diff --git a/src/sbbs3/scfg/scfg.c b/src/sbbs3/scfg/scfg.c
index 9b43ad3bf3d3a7c14a08f78cae988f2a6c2c329c..b27faa64d277d5d445f047928279b96d73d8fa45 100644
--- a/src/sbbs3/scfg/scfg.c
+++ b/src/sbbs3/scfg/scfg.c
@@ -1,8 +1,5 @@
 /* Synchronet configuration utility 										*/
 
-/* $Id: scfg.c,v 1.118 2020/08/17 00:48:43 rswindell Exp $ */
-// vi: tabstop=4
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -16,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
diff --git a/src/sbbs3/scfg/scfg.h b/src/sbbs3/scfg/scfg.h
index c3992d81ed704c9554ff883934e6e320e582733c..f050dc05420e4baf46f24f42443abc4fca09d031 100644
--- a/src/sbbs3/scfg/scfg.h
+++ b/src/sbbs3/scfg/scfg.h
@@ -1,6 +1,3 @@
-/* $Id: scfg.h,v 1.35 2020/06/12 15:57:17 rswindell Exp $ */
-// vi: tabstop=4
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -14,21 +11,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -37,9 +22,16 @@
 #include <stdbool.h>
 #include <limits.h>	/* USHRT_MAX */
 
+#include "scfgsave.h"
+#include "scfglib.h"
+#include "date_str.h"
+#include "str_util.h"
 #include "gen_defs.h"
+#include "smblib.h"
+#include "load_cfg.h"
+#include "ini_file.h"
 #include "uifc.h"
-#include "sbbs.h"
+#include "nopen.h"
 
 /**********/
 /* Macros */
diff --git a/src/sbbs3/scfg/scfgchat.c b/src/sbbs3/scfg/scfgchat.c
index f1953c31c466f88d876b5ac11c72c9560cd1fa1f..9867776d61c3378dba09d21ebfe7aef515181005 100644
--- a/src/sbbs3/scfg/scfgchat.c
+++ b/src/sbbs3/scfg/scfgchat.c
@@ -13,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
diff --git a/src/sbbs3/scfg/scfgmsg.c b/src/sbbs3/scfg/scfgmsg.c
index 080b2572a89b4223da4a394345d9594b5ee2eb6e..30183d39450f66aff51b39f023d2e4207c698397 100644
--- a/src/sbbs3/scfg/scfgmsg.c
+++ b/src/sbbs3/scfg/scfgmsg.c
@@ -15,26 +15,15 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
 #include "scfg.h"
 #include "strwrap.h"	/* itoa() */
+#include "str_util.h"
 #include <stdbool.h>
 
 #define CUT_GROUPNUM	USHRT_MAX
diff --git a/src/sbbs3/scfglib1.c b/src/sbbs3/scfglib1.c
index f6a01ee9480f87357ac871b19806c043b79ab46b..6fc8fbdc76cbd988bbc1e4fa1a56cbfcc934b4aa 100644
--- a/src/sbbs3/scfglib1.c
+++ b/src/sbbs3/scfglib1.c
@@ -1,7 +1,5 @@
 /* Synchronet configuration library routines */
 
-/* $Id: scfglib1.c,v 1.86 2020/08/08 19:04:07 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,34 +13,16 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
 #include "scfglib.h"
-
-/***********************************************************/
-/* These functions are called from here and must be linked */
-/***********************************************************/
-/***
-	nopen()
-	truncsp()
-***/
+#include "load_cfg.h"
+#include "nopen.h"
+#include "ars_defs.h"
 
 BOOL allocerr(FILE* fp, char* error, long offset, char *fname, uint size)
 {
diff --git a/src/sbbs3/scfglib2.c b/src/sbbs3/scfglib2.c
index 9f529dffe72bdd98fa9b2f514389e58d4fb9634c..f714bc7cd1d768bc8fc073928bde81385a5b1d39 100644
--- a/src/sbbs3/scfglib2.c
+++ b/src/sbbs3/scfglib2.c
@@ -1,9 +1,5 @@
-/* scfglib2.c */
-
 /* Synchronet configuration library routines */
 
-/* $Id: scfglib2.c,v 1.53 2020/08/08 20:17:03 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -17,26 +13,15 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
 #include "scfglib.h"
+#include "nopen.h"
+#include "ars_defs.h"
 
 /****************************************************************************/
 /* Reads in FILE.CNF and initializes the associated variables				*/
diff --git a/src/sbbs3/scfgsave.c b/src/sbbs3/scfgsave.c
index 9f40f4a4ca8324c0bf5f4154dd3d9f00e7d9231c..29b2a217ca0f703963e4596cbc6d43ef6545f548 100644
--- a/src/sbbs3/scfgsave.c
+++ b/src/sbbs3/scfgsave.c
@@ -1,7 +1,5 @@
 /* Synchronet configuration file save routines */
 
-/* $Id: scfgsave.c,v 1.98 2020/08/08 20:17:03 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,17 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "scfgsave.h"
+#include "load_cfg.h"
+#include "smblib.h"
+#include "userdat.h"
+#include "nopen.h"
 
 BOOL no_msghdr=FALSE,all_msghdr=FALSE;
 
diff --git a/src/sbbs3/scfgsave.h b/src/sbbs3/scfgsave.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0363a72bbc6ddd06017ea6bbaa74e3d480ade38
--- /dev/null
+++ b/src/sbbs3/scfgsave.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _SCFGSAVE_H_
+#define _SCFGSAVE_H_
+
+#include "scfgdefs.h"
+#include "smbdefs.h"
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT BOOL		save_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_node_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_main_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_msgs_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_file_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_chat_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT BOOL		write_xtrn_cfg(scfg_t* cfg, int backup_level);
+DLLEXPORT void		refresh_cfg(scfg_t* cfg);
+DLLEXPORT int		smb_storage_mode(scfg_t*, smb_t*);
+DLLEXPORT int		smb_open_sub(scfg_t*, smb_t*, unsigned int subnum);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
diff --git a/src/sbbs3/smbactiv.c b/src/sbbs3/smbactiv.c
index 4fb72c54c3c1018744a85c412ad289b4a5f60d21..055fc32d2cc13c02a4965db4268c0bf8c8b7139a 100644
--- a/src/sbbs3/smbactiv.c
+++ b/src/sbbs3/smbactiv.c
@@ -1,8 +1,27 @@
-/* SMBACTIV.C */
-
-/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
-
-#include "sbbs.h"
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#include "load_cfg.h"
+#include "smblib.h"
+#include "str_util.h"
+#include "nopen.h"
+#include <stdarg.h>
 
 #define SMBACTIV_VER "1.01"
 
diff --git a/src/sbbs3/smbutil.c b/src/sbbs3/smbutil.c
index f651220e6bf503d400ab76a8e60715fe230d83ac..daeddf3447cea63e9142a36d89ddc6e482dccf38 100644
--- a/src/sbbs3/smbutil.c
+++ b/src/sbbs3/smbutil.c
@@ -1,8 +1,5 @@
 /* Synchronet message base (SMB) utility */
 
-/* $Id: smbutil.c,v 1.136 2020/05/25 00:40:34 rswindell Exp $ */
-// vi: tabstop=4
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -16,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -63,8 +48,10 @@ const char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
 #include <string.h>		/* strrchr */
 #include <ctype.h>		/* toupper */
 
+#include "fidodefs.h"
+#include "smblib.h"
+#include "str_util.h"
 #include "utf8.h"
-#include "sbbs.h"
 #include "conwrap.h"
 
 /* gets is dangerous */
diff --git a/src/sbbs3/str_util.c b/src/sbbs3/str_util.c
index e64133be0ea701cc35a4c71e3e4d14708eb74948..23457c253542eec9cc217a7236e82c8095d78497 100644
--- a/src/sbbs3/str_util.c
+++ b/src/sbbs3/str_util.c
@@ -1,7 +1,5 @@
 /* Synchronet string utility routines */
 
-/* $Id: str_util.c,v 1.68 2020/08/17 00:48:29 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,25 +13,13 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "str_util.h"
 #include "utf8.h"
 #include "unicode.h"
 #include "cp437defs.h"
diff --git a/src/sbbs3/str_util.h b/src/sbbs3/str_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ffac35a80b52a563ae6547b526e589ecd0bfae2
--- /dev/null
+++ b/src/sbbs3/str_util.h
@@ -0,0 +1,73 @@
+/* Synchronet string utility functions */
+
+/****************************************************************************
+ * @format.tab-size 4		(Plain Text/Source Code File Header)			*
+ * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
+ *																			*
+ * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
+ *																			*
+ * This program is free software; you can redistribute it and/or			*
+ * modify it under the terms of the GNU General Public License				*
+ * as published by the Free Software Foundation; either version 2			*
+ * of the License, or (at your option) any later version.					*
+ * See the GNU General Public License for more details: gpl.txt or			*
+ * http://www.fsf.org/copyleft/gpl.html										*
+ *																			*
+ * For Synchronet coding style and modification guidelines, see				*
+ * http://www.synchro.net/source.html										*
+ *																			*
+ * Note: If this box doesn't appear square, then you need to fix your tabs.	*
+ ****************************************************************************/
+
+#ifndef _STR_UTIL_H_
+#define _STR_UTIL_H_
+
+#include "scfgdefs.h"	// scfg_t
+#include "dllexport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DLLEXPORT char*		backslashcolon(char *str);
+DLLEXPORT ulong		ahtoul(const char *str);	/* Converts ASCII hex to ulong */
+DLLEXPORT char *	hexplus(uint num, char *str); 	/* Hex plus for 3 digits up to 9000 */
+DLLEXPORT uint		hptoi(const char *str);
+DLLEXPORT int		pstrcmp(const char **str1, const char **str2);  /* Compares pointers to pointers */
+DLLEXPORT int		strsame(const char *str1, const char *str2);	/* Compares number of same chars */
+DLLEXPORT char *	remove_ctrl_a(const char* instr, char* outstr);
+DLLEXPORT char 		ctrl_a_to_ascii_char(char code);
+DLLEXPORT char *	truncstr(char* str, const char* set);
+DLLEXPORT char *	ascii_str(uchar* str);
+DLLEXPORT char *	condense_whitespace(char* str);
+DLLEXPORT char		exascii_to_ascii_char(uchar ch);
+DLLEXPORT BOOL		findstr(const char *insearch, const char *fname);
+DLLEXPORT BOOL		findstr_in_string(const char* insearchof, char* string);
+DLLEXPORT BOOL		findstr_in_list(const char* insearchof, str_list_t list);
+DLLEXPORT str_list_t findstr_list(const char* fname);
+DLLEXPORT BOOL		trashcan(scfg_t* cfg, const char *insearch, const char *name);
+DLLEXPORT char *	trashcan_fname(scfg_t* cfg, const char *name, char* fname, size_t);
+DLLEXPORT str_list_t trashcan_list(scfg_t* cfg, const char* name);
+DLLEXPORT char *	strip_ansi(char* str);
+DLLEXPORT char *	strip_exascii(const char *str, char* dest);
+DLLEXPORT char *	strip_space(const char *str, char* dest);
+DLLEXPORT char *	prep_file_desc(const char *str, char* dest);
+DLLEXPORT char *	strip_ctrl(const char *str, char* dest);
+DLLEXPORT char *	strip_char(const char* str, char* dest, char);
+DLLEXPORT char *	net_addr(net_t* net);
+DLLEXPORT BOOL		valid_ctrl_a_attr(char a);
+DLLEXPORT BOOL		valid_ctrl_a_code(char a);
+DLLEXPORT size_t	strip_invalid_attr(char *str);
+DLLEXPORT char *	ultoac(ulong l,char *str);
+DLLEXPORT char *	rot13(char* str);
+DLLEXPORT uint32_t	str_to_bits(uint32_t currval, const char *str);
+DLLEXPORT BOOL		str_has_ctrl(const char*);
+DLLEXPORT BOOL		str_is_ascii(const char*);
+DLLEXPORT char *	utf8_to_cp437_str(char* str);
+DLLEXPORT char *	subnewsgroupname(scfg_t*, sub_t*, char*, size_t);
+DLLEXPORT char * 	get_ctrl_dir(BOOL warn);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Don't add anything after this line */
\ No newline at end of file
diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index 2ed12a4e7bca33a22ff2e97a8ebed94b64ef0e81..723952e5120e91f3e2f29ee452fc9c6250a60917 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -1,7 +1,4 @@
 /* Synchronet user data-related routines (exported) */
-// vi: tabstop=4
-
-/* $Id: userdat.c,v 1.230 2020/08/16 00:47:36 rswindell Exp $ */
 
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
@@ -16,26 +13,25 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
-#include "sbbs.h"
+#include "str_util.h"
 #include "cmdshell.h"
+#include "userdat.h"
+#include "filedat.h"
+#include "ars_defs.h"
+#include "text.h"
+#include "nopen.h"
+#include "datewrap.h"
+#include "date_str.h"
+#include "smblib.h"
+#include "getstats.h"
+#include "msgdate.h"
+
 #ifndef USHRT_MAX
 	#define USHRT_MAX ((unsigned short)~0)
 #endif
diff --git a/src/sbbs3/userdat.h b/src/sbbs3/userdat.h
index 8978c531b842809499ac400428f31fedbbd73328..36c46244028272515a82ccd82081b6b460be3aab 100644
--- a/src/sbbs3/userdat.h
+++ b/src/sbbs3/userdat.h
@@ -1,7 +1,5 @@
 /* Synchronet user data access routines (exported) */
 
-/* $Id: userdat.h,v 1.77 2020/04/30 18:25:58 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,21 +13,9 @@
  * See the GNU General Public License for more details: gpl.txt or			*
  * http://www.fsf.org/copyleft/gpl.html										*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -40,24 +26,8 @@
 #include "dat_rec.h"	/* getrec/putrec prototypes */
 #include "client.h"		/* client_t */
 #include "link_list.h"
-
-#ifdef DLLEXPORT
-#undef DLLEXPORT
-#endif
-
-#ifdef _WIN32
-	#ifdef __MINGW32__
-		#define DLLEXPORT
-	#else
-		#ifdef SBBS_EXPORTS
-			#define DLLEXPORT __declspec(dllexport)
-		#else
-			#define DLLEXPORT __declspec(dllimport)
-		#endif
-	#endif
-#else
-	#define DLLEXPORT
-#endif
+#include "startup.h"	/* struct login_attempt_settings */
+#include "dllexport.h"
 
 #ifdef __cplusplus
 extern "C" {