diff --git a/!MkClean,fd7 b/!MkClean,fd7
index 8010a81406b20a3a0a8db8bbf4682ea1b48406a0..f72a37e8a7fbd49354eb91b20d4feba9f4ea3e96 100644
--- a/!MkClean,fd7
+++ b/!MkClean,fd7
@@ -13,5 +13,5 @@
 | limitations under the License.
 |
 Dir <Obey$Dir>
-amu_machine clean
+amu_machine clean COMPONENT=TextGadget
 stripdepnd Makefile
diff --git a/!MkRam,fd7 b/!MkRam,fd7
index 2acffd9058f26fea64873fcabcdcdd13e4a2b2f9..599f0a6587c4ce9803f672dc20c2205c8fcedf1e 100644
--- a/!MkRam,fd7
+++ b/!MkRam,fd7
@@ -13,4 +13,4 @@
 | limitations under the License.
 |
 Dir <Obey$Dir>
-amu_machine THROWBACK=-throwback all
+amu_machine all COMPONENT=TextGadget
diff --git a/!MkRom,fd7 b/!MkRom,fd7
index 6b2056e2e084f55e94fe252fd16252227dd6d918..c6fe19a4a0acdad18781b39b458b76fb7d965117 100644
--- a/!MkRom,fd7
+++ b/!MkRom,fd7
@@ -13,4 +13,4 @@
 | limitations under the License.
 |
 Dir <Obey$Dir>
-amu_machine rom
+amu_machine rom COMPONENT=TextGadget
diff --git a/Makefile b/Makefile
index 7914e70ad73bb3f7f9b275b223e06bd602cbe300..a431aad716b37d9a49bf59c6698b6405de381876 100644
--- a/Makefile
+++ b/Makefile
@@ -12,205 +12,43 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# Makefile for TextGadget
+# Makefile for a Toolbox Object module
 #
-# ***********************************
-# ***    C h a n g e   L i s t    ***
-# ***********************************
-# Date       Name   Description
-# ----       ----   -----------
-# 12/05/97  RLougher  Created
-# 04/06/98  SBrodie   Added RAM build into same Makefile
-
+# $Id$
 #
 # Component specific options:
 #
-COMPONENT  = TextGadget
-ROM_MODULE = aof.${COMPONENT}
-RAM_MODULE = rm.${COMPONENT}
+RAMBOTH =
 
-#
-# Export Paths for Messages module
-#
-RESDIR = <resource$dir>.Resources2.${COMPONENT}
+COMMON_OBJ = o.ModHdr o.glib o.glib3 o.MemMan o.riscos_uti o.Scrollbar \
+ o.ScrollList o.Sizes o.TextArea o.TextMan \
+ o.Font o.riscos_gra o.ScrollLisS o.TAsel_ven o.Text o.Utils
 
-EXP_HDR = <export$dir>.^.Interface2
-EXP_C_H = <Cexport$dir>.h
-EXP_C_O = <Cexport$dir>.o
+ROM_OBJS = o.mainROM ${COMMON_OBJ}
 
-#
-# Generic options
-#
+RAM_OBJS = o.main ${RAMBOTH} ${COMMON_OBJ}
 
-MKDIR   = do mkdir -p
-AS      = objasm
-CC      = cc
-CMHG    = cmhg
-CP      = copy
-LD      = link
-RM      = remove
-WIPE    = x wipe
-CD      = dir
-CHMOD   = access
+DBG_OBJS = od.main ${RAMBOTH} od.ModHdr od.glib od.glib3 od.MemMan od.riscos_uti od.Scrollbar \
+ od.ScrollList od.Sizes od.TextArea od.TextMan \
+ od.Font od.riscos_gra od.ScrollLisS od.TAsel_ven od.Text od.Utils
 
-#FEATURES   = -zM -zps1 -g ${DFLAGS}
-FEATURES   = -zM -zps1 -ffah ${DFLAGS}
-AFLAGS     = ${THROWBACK} -depend !Depend
-CFLAGS     = ${THROWBACK} -depend !Depend -c ${FEATURES} ${INCLUDES}
-CMHGFLAGS  = ${THROWBACK} -depend !Depend -p ${DFLAGS}
-CPFLAGS    = ~cfr~v
-WFLAGS     = ~c~vr
-CHMODFLAGS = RW/R
+EXTRARAMLIBS = c:tboxlibs.o.wimplib c:tboxlibs.o.toolboxlib
 
-DFLAGS  = -D${SYSTEM}_BUILD #-DUSE_TINY ${DEBUG}
+EXTRAROMLIBS = c:tboxlibs.o.wimplib c:tboxlibs.o.toolboxlib
 
-INCLUDES = -IC:tboxlibint,tbox:,C:
-
-
-# ------------------------------------------------------------------------------
-# Libraries
 #
-ANSILIB   = CLib:o.ansilib
-CLIB      = CLIB:o.stubs
-RLIB      = RISCOSLIB:o.risc_oslib
-ROMCSTUBS = RISCOSLIB:o.romcstubs
-TBOXLIB   = c:tboxlibs.o.toolboxlib
-WIMPLIB   = c:tboxlibs.o.wimplib
-RSTUBS     = RISCOSLIB:o.rstubs
-ROMSTUBS   = RISCOSLIB:o.romstubs
-REMOTEDB   = <Lib$Dir>.debug.o.remotezm
-
-# Which is correct? sbrodie 19/06/1998.  Daytona uses AbsSym, Spinner/Trunk uses c_abssym
-
-ABSSYM    = RISC_OSLib:o.c_abssym
-# ABSSYM     = RISC_OSLib:o.AbsSym
-
-
-OBJS =\
-	o.Modhdr \
-	o.TextGadget \
-	o.TextArea \
-	o.ScrollList \
-	o.Scrollbar \
-	o.riscos_uti \
-	o.riscos_gra \
-	o.Font \
-	o.TextMan \
-	o.MemMan \
-	o.Text \
-	o.ScrollLisS \
-	o.Utils \
-	o.TAsel_ven \
-	o.glib \
-	o.glib3 \
-	o.rmensure \
-	o.Sizes \
-	o.string32
-
-RAM_OBJS =\
-	o.Modhdr \
-	o.TextGadget \
-	o.TextArea \
-	o.ScrollList \
-	o.Scrollbar \
-	o.riscos_uti \
-	o.riscos_gra \
-	o.Font \
-	o.TextMan \
-	o.MemMan \
-	o.Text \
-	o.ScrollLisS \
-	o.Utils \
-	o.TAsel_ven \
-	o.glib \
-	o.glib3 \
-	o.rmensure \
-	o.Sizes \
-	o.string32
-
-
-# ------------------------------------------------------------------------------
-HDR = h.ModHdr
-
-# ------------------------------------------------------------------------------
-# Rule patterns
+# Get main rules
 #
+include C:tboxlibint.TboxMake
 
-.SUFFIXES:	.o .h .s .c .cmhg
-
-.c.o:;		@echo
-		@echo Compiling $< ( ${FEATURES})
-		@${CC} ${CFLAGS} -o $@ $<
-
-.cmhg.o:;	@echo
-		@echo Generating module C veneers ( -p ${DFLAGS})
-		@${CMHG} ${CMHGFLAGS} $< -o $@
-
-.cmhg.h:;	@echo
-		@echo Generating module C veneers' header file ( -p ${DFLAGS})
-		@${CMHG} ${CMHGFLAGS} $< -d $@
-
-.s.o:;		@echo
-		@echo Assembling $<
-		@${AS} ${AFLAGS} -o $@ $<
-
-
-all: ${RAM_MODULE}
-	@echo
-	@echo ${COMPONENT}: Module built (RAM) in ${RAM_MODULE}
-
-rom: ${ROM_MODULE}
-	@echo ${COMPONENT}: Module built (ROM)
-
-install: ${RAM_MODULE}
-	${MKDIR} ${INSTDIR}
-	${CP} ${RAM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
-
-install_rom: ${ROM_MODULE}
-	${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
-	@echo ${COMPONENT}: Module installed (ROM)
-
-export: ${EXPORTS}
-	@echo
-	@echo ${COMPONENT}: No exports
-
-clean:
-	@echo
-	${WIPE} o.* ${WFLAGS}
-	${WIPE} aof ${WFLAGS}
-	${WIPE} rm ${WFLAGS}
-	${WIPE} linked ${WFLAGS}
-	${WIPE} map ${WFLAGS}
-	${RM} ${HDR}
-	@echo ${COMPONENT}: cleaned
-
-${ROM_MODULE}: ${OBJS} ${TBOXLIB} ${WIMPLIB} ${ROMCSTUBS} ${HDR}
-	${MKDIR} aof
-	${LD} -o $@ -aof ${OBJS} ${TBOXLIB} ${WIMPLIB} ${ROMCSTUBS}
-
-${RAM_MODULE}: ${RAM_OBJS} ${TBOXLIB} ${WIMPLIB} ${CLIB} ${HDR}
-	${mkdir} rm
-	${LD} -o $@ -module ${RAM_OBJS} ${TBOXLIB} ${WIMPLIB} ${CLIB}
-	${CHMOD} rm.${COMPONENT} ${CHMODFLAGS}
-
-
-# Final link for the ROM Image (using given base address)
-rom_link:
-	${MKDIR} linked
-	${MKDIR} map
-	${LD} -o linked.${COMPONENT} -rmf -base ${ADDRESS} ${ROM_MODULE} ${ABSSYM} \
-              -map > map.${COMPONENT}
-	${CP} linked.${COMPONENT} ${LINKDIR}.${COMPONENT} ${CPFLAGS}
-	@echo ${COMPONENT}: rom_link complete
-
-
-# ------------------------------------------------------------------------------
-# Relocatable module target
 #
+# Module specific rules:
+#
+resources:
+	@echo ${COMPONENT}: not internationalised, so no files copied to Messages module
 
-${EXP_C_H}.${COMPONENT}:	h.${COMPONENT}
-	${CP} h.${COMPONENT} $@ ${CPFLAGS}
-
+clean: toolbox-clean
+	@echo ${COMPONENT}: cleaned
 
-# ------------------------------------------------------------------------------
+#---------------------------------------------------------------------------
 # Dynamic dependencies:
diff --git a/VersionNum b/VersionNum
index fb695f3e29795c81be6b006b3ce87054deeb1b27..936b2d134aa59a3b5c124eb127cd20c69e67bc99 100644
--- a/VersionNum
+++ b/VersionNum
@@ -1,23 +1,23 @@
-/* (0.32)
+/* (0.33)
  *
  * This file is automatically maintained by srccommit, do not edit manually.
  * Last processed by srccommit version: 1.1.
  *
  */
-#define Module_MajorVersion_CMHG        0.32
+#define Module_MajorVersion_CMHG        0.33
 #define Module_MinorVersion_CMHG        
-#define Module_Date_CMHG                25 Jun 2011
+#define Module_Date_CMHG                14 Jan 2012
 
-#define Module_MajorVersion             "0.32"
-#define Module_Version                  32
+#define Module_MajorVersion             "0.33"
+#define Module_Version                  33
 #define Module_MinorVersion             ""
-#define Module_Date                     "25 Jun 2011"
+#define Module_Date                     "14 Jan 2012"
 
-#define Module_ApplicationDate          "25-Jun-11"
+#define Module_ApplicationDate          "14-Jan-12"
 
 #define Module_ComponentName            "Gadgets"
 #define Module_ComponentPath            "castle/RiscOS/Sources/Toolbox/Gadgets"
 
-#define Module_FullVersion              "0.32"
-#define Module_HelpVersion              "0.32 (25 Jun 2011)"
-#define Module_LibraryVersionInfo       "0:32"
+#define Module_FullVersion              "0.33"
+#define Module_HelpVersion              "0.33 (14 Jan 2012)"
+#define Module_LibraryVersionInfo       "0:33"
diff --git a/c/TextGadget b/c/main
similarity index 99%
rename from c/TextGadget
rename to c/main
index 41d5e432da10e4eef7fec5ee785d5ac49beb7d0c..a85ad0f907981e6a842d46b5e9e46c461d291212 100644
--- a/c/TextGadget
+++ b/c/main
@@ -1,4 +1,4 @@
-/* Copyright 1997 Acorn Computers Ltd
+/* Copyright 2012 Castle Technology Ltd
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/c/rmensure b/c/rmensure
deleted file mode 100644
index 2505c496f8c8fd44aa0df5cdda4a1ccec9166a18..0000000000000000000000000000000000000000
--- a/c/rmensure
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright 1997 Acorn Computers Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/* File:    rmensure.c
- * Purpose: ensuring a module is loaded
- * Author:  IDJ
- * History: 24-Jun-94: IDJ: created
- */
-
-
-#include <stdio.h>
-#include "kernel.h"
-#include "swis.h"
-
-#include "rmensure.h"
-
-_kernel_oserror *rmensure (char *module_name, char *file_name, char *module_version)
-{
-#ifndef ROM
-    _kernel_swi_regs regs;
-    _kernel_oserror *e;
-    char command[256];
-
-    /*
-     * see if the module is there at all!
-     */
-
-    sprintf (command, "*RMEnsure %s %s *RMLoad System:modules.%s", module_name,
-                                module_version, file_name);
-
-    regs.r[0] = (int)command;
-    if ((e = _kernel_swi (OS_CLI, &regs, &regs)) != NULL)
-        return e;
-
-    sprintf (command, "*RMEnsure %s %s", module_name, module_version);
-
-    regs.r[0] = (int)command;
-    if ((e = _kernel_swi (OS_CLI, &regs, &regs)) != NULL)
-        return e;
-#else
-    IGNORE(module_name);
-    IGNORE(file_name);
-    IGNORE(module_version);
-#endif
-
-    return NULL;
-}
diff --git a/c/string32 b/c/string32
deleted file mode 100644
index d029a37e5940e6c4a77e5ae564c4d2d18ee94a4c..0000000000000000000000000000000000000000
--- a/c/string32
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Copyright 1997 Acorn Computers Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/* File:     string32.c
- * Purpose:  strings terminated by char < 32
- * Author:   Timothy Roddis
- * History:  24-Jan-94: IDJ: created from original TGR sources
- */
-
-#include "string32.h"
-
-
-/* Strings passed to the toolbox might be terminated with any control character ... */
-
-#define NULL 0
-
-void string_copy (char *dst_txt, char *src_txt)
-{
-   /*
-    * copy a ctrl-terminated string to a buffer big enough to
-    * hold the result (no length checking).
-    */
-
-   if (!src_txt) src_txt = "";
-
-   while ((*(dst_txt++)=*(src_txt++))>=32);
-   *(--dst_txt) = '\0';
-}
-
-
-
-char *string_copy_chk (char *dst_txt, char *src_txt, int max_len)
-{
-   int i;
-
-   /*
-    * copy a ctrl-terminated string to a buffer checking it is big enough to
-    * hold the result.  Return NULL and nul-terminate, if dst buffer not
-    * big enough.
-    */
-
-   if (dst_txt == NULL || max_len == 0)
-       return NULL;
-   if (!src_txt) src_txt = "";
-
-   for (i=1;(*dst_txt++=*src_txt++)>=32;i++)
-      if (i>=max_len) {
-         *(--dst_txt) = '\0';
-         return NULL;
-      }
-   *(--dst_txt) = '\0';
-
-   return dst_txt;
-}
-
-
-int string_length (char *txt)
-{
-   int i=0;
-
-   /*
-    * return length of ctrl-terminated string
-    */
-
-   if (!txt) return 0;
-   while ((*txt>=32) || (*txt==9))
-   {
-       txt++;
-       i++;
-   }
-   return i;
-}
-
-
-void string_to_buffer (char *dst_txt, char *src_txt, int *max_len)
-{
-    /*
-     * general purpose routine to fill in a user-supplied buffer (and report
-     * number of bytes written), or just report size of buffer needed.
-     * If buffer is supplied (dst_txt != 0), then *max_len gives size of supplied
-     * buffer; if this is not large enough, don't return an error, but return
-     * size of bufer required!
-     */
-
-    int src_len = string_length (src_txt) + 1;
-
-    if (dst_txt == NULL)
-        *max_len = src_len;
-    else   /* user-supplied buffer */
-    {
-        if (*max_len >= src_len)
-            string_copy (dst_txt, src_txt);
-        else
-            string_copy_chk (dst_txt, src_txt, *max_len);
-
-        *max_len = string_length (dst_txt) + 1;
-    }
-}
-
diff --git a/h/rmensure b/h/rmensure
deleted file mode 100644
index 494e6b30fe54212ef4b86cefe20548d144738e38..0000000000000000000000000000000000000000
--- a/h/rmensure
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 1997 Acorn Computers Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/* File:    rmensure.h
- * Purpose: ensuring a module is loaded
- * Author:  IDJ
- * History: 24-Jun-94: IDJ: created
- */
-
-
-extern _kernel_oserror *rmensure (char *module_name, char *file_name, char *module_version);
diff --git a/h/string32 b/h/string32
deleted file mode 100644
index e6c2eaf18f7cfbb9761918232c4bfc0a77496f3e..0000000000000000000000000000000000000000
--- a/h/string32
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright 1997 Acorn Computers Ltd
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/* File:     string32.h
- * Purpose:  strings terminated by char < 32
- * Author:   Timothy Roddis
- * History:  24-Jan-94: IDJ: created from original TGR sources
- */
-
-/* Strings passed to the toolbox might be terminated with any control character ... */
-
-
-
-extern void string_copy (char *dst_txt, char *src_txt);
-   /*
-    * copy a ctrl-terminated string to a buffer big enough to
-    * hold the result (no length checking).
-    */
-
-
-
-
-extern char *string_copy_chk (char *dst_txt, char *src_txt, int max_len);
-   /*
-    * copy a ctrl-terminated string to a buffer checking it is big enough to
-    * hold the result.  Return NULL and nul-terminate, if dst buffer not
-    * big enough.
-    */
-
-
-
-extern int string_length (char *txt);
-   /*
-    * return length of ctrl-terminated string
-    */
-
-
-extern void string_to_buffer (char *dst_txt, char *src_txt, int *max_len);
-    /*
-     * general purpose routine to fill in a user-supplied buffer (and report
-     * number of bytes written), or just report size of buffer needed.
-     * If buffer is supplied (dst_txt != 0), then *max_len gives size of supplied
-     * buffer; if this is not large enough, don't return an error, but return
-     * size of bufer required!
-     */
diff --git a/s/ScrollLisS b/s/ScrollLisS
index 84dd23111a634ea0f85a824c30224eebc77239cf..a2a65f8d892c733d45a835bc520d62ef789ed0bd 100644
--- a/s/ScrollLisS
+++ b/s/ScrollLisS
@@ -23,10 +23,8 @@
         GET     Hdr:System
         GET     Hdr:APCS.<APCS>
 
-;	IMPORT	_scrolllist_redraw
-
 ; APCS compliant
-; SVC mode compatible (a4/r3 used as link register)
+; SVC mode compatible (link register stacked)
 
 ; Updates a scrolling list gadget
 ; Prototype: _kernel_oserror *scrolllist_update(PrivateScrollList *sdata,
@@ -39,10 +37,9 @@
 scrolllist_update
 	EXPORT	scrolllist_update
 
+      [ {TRUE}
         Return  ,LinkNotStacked
-
-        END
-
+      |
 	mov	ip, sp
 	stmfd	sp!, {r4, lr}
 
@@ -63,7 +60,7 @@ scrolllist_update
 redraw_loop
 	teq	r0, #0
 	addeq	sp, sp, #44
-	ldmeqfd	sp!, {r4, pc}^
+	Return  "r4",,EQ
 
 	mov	r0, r4
 	bl	_scrolllist_redraw
@@ -71,5 +68,6 @@ redraw_loop
 	mov	r1, sp
 	swi	XWimp_GetRectangle
 	b	redraw_loop
+      ]
 
 	END