Index: Makefile.am
===================================================================
--- Makefile.am	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ Makefile.am	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -39,5 +39,5 @@
 
 CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \
-     commands.c global.c text.c fmtext.c gmarshal_funcs.c editwin.c \
+     commands.c global.c text.c fmtext.c editwin.c \
      util.c logging.c \
      perlconfig.c keys.c functions.c zwrite.c viewwin.c help.c filter.c \
@@ -52,6 +52,6 @@
 BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS)
 
-GEN_C = varstubs.c perlglue.c
-GEN_H = owl_prototypes.h
+GEN_C = varstubs.c perlglue.c gmarshal_funcs.c
+GEN_H = owl_prototypes.h gmarshal_funcs.h
 
 BUILT_SOURCES = $(GEN_C) $(GEN_H)
@@ -75,4 +75,9 @@
 	$(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
 
+gmarshal_funcs.h: marshal_types
+	glib-genmarshal --header $< > $@
+gmarshal_funcs.c: marshal_types
+	glib-genmarshal --body $< > $@
+
 # For emacs flymake-mode
 check-syntax: proto
Index: commands.c
===================================================================
--- commands.c	(revision 8258ea514c05b11da3f68d25d8414e222496fa2d)
+++ commands.c	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -1605,4 +1605,5 @@
     if (!silent) owl_function_error("Unknown variable '%s'", var);
   } else if (requirebool && owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
+    // FIXME: The above won't work when we make perl variables OWL_VARIABLE_SV
     if (!silent) owl_function_error("Variable '%s' is not a boolean", var);
   } else {
@@ -1634,4 +1635,5 @@
     if (!silent) owl_function_error("Unknown variable '%s'", var);
   } else if (owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
+    // FIXME: The above won't work when we make perl variables OWL_VARIABLE_SV
     if (!silent) owl_function_error("Variable '%s' is not a boolean", var);
   } else {
Index: arshal_funcs.c
===================================================================
--- gmarshal_funcs.c	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ 	(revision )
@@ -1,396 +1,0 @@
-
-#include	<glib-object.h>
-
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v)     g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v)      g_value_get_int (v)
-#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
-#define g_marshal_value_peek_long(v)     g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
-#define g_marshal_value_peek_float(v)    g_value_get_float (v)
-#define g_marshal_value_peek_double(v)   g_value_get_double (v)
-#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v)    g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v)   g_value_get_object (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- *          Do not access GValues directly in your code. Instead, use the
- *          g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
-#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
-#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
-#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
-#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
-#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-
-/* INT:STRING (marshal_types:2) */
-void
-g_cclosure_user_marshal_INT__STRING (GClosure     *closure,
-                                     GValue       *return_value G_GNUC_UNUSED,
-                                     guint         n_param_values,
-                                     const GValue *param_values,
-                                     gpointer      invocation_hint G_GNUC_UNUSED,
-                                     gpointer      marshal_data)
-{
-  typedef gint (*GMarshalFunc_INT__STRING) (gpointer     data1,
-                                            gpointer     arg_1,
-                                            gpointer     data2);
-  register GMarshalFunc_INT__STRING callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gint v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_INT__STRING) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_string (param_values + 1),
-                       data2);
-
-  g_value_set_int (return_value, v_return);
-}
-
-/* INT:INT (marshal_types:3) */
-void
-g_cclosure_user_marshal_INT__INT (GClosure     *closure,
-                                  GValue       *return_value G_GNUC_UNUSED,
-                                  guint         n_param_values,
-                                  const GValue *param_values,
-                                  gpointer      invocation_hint G_GNUC_UNUSED,
-                                  gpointer      marshal_data)
-{
-  typedef gint (*GMarshalFunc_INT__INT) (gpointer     data1,
-                                         gint         arg_1,
-                                         gpointer     data2);
-  register GMarshalFunc_INT__INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gint v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_INT__INT) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_int (param_values + 1),
-                       data2);
-
-  g_value_set_int (return_value, v_return);
-}
-
-/* INT:BOOL (marshal_types:4) */
-void
-g_cclosure_user_marshal_INT__BOOLEAN (GClosure     *closure,
-                                      GValue       *return_value G_GNUC_UNUSED,
-                                      guint         n_param_values,
-                                      const GValue *param_values,
-                                      gpointer      invocation_hint G_GNUC_UNUSED,
-                                      gpointer      marshal_data)
-{
-  typedef gint (*GMarshalFunc_INT__BOOLEAN) (gpointer     data1,
-                                             gboolean     arg_1,
-                                             gpointer     data2);
-  register GMarshalFunc_INT__BOOLEAN callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gint v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_INT__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_boolean (param_values + 1),
-                       data2);
-
-  g_value_set_int (return_value, v_return);
-}
-
-/* INT:VOID (marshal_types:6) */
-void
-g_cclosure_user_marshal_INT__VOID (GClosure     *closure,
-                                   GValue       *return_value G_GNUC_UNUSED,
-                                   guint         n_param_values,
-                                   const GValue *param_values,
-                                   gpointer      invocation_hint G_GNUC_UNUSED,
-                                   gpointer      marshal_data)
-{
-  typedef gint (*GMarshalFunc_INT__VOID) (gpointer     data1,
-                                          gpointer     data2);
-  register GMarshalFunc_INT__VOID callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gint v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 1);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_INT__VOID) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       data2);
-
-  g_value_set_int (return_value, v_return);
-}
-
-/* BOOL:VOID (marshal_types:7) */
-void
-g_cclosure_user_marshal_BOOLEAN__VOID (GClosure     *closure,
-                                       GValue       *return_value G_GNUC_UNUSED,
-                                       guint         n_param_values,
-                                       const GValue *param_values,
-                                       gpointer      invocation_hint G_GNUC_UNUSED,
-                                       gpointer      marshal_data)
-{
-  typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer     data1,
-                                                  gpointer     data2);
-  register GMarshalFunc_BOOLEAN__VOID callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gboolean v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 1);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       data2);
-
-  g_value_set_boolean (return_value, v_return);
-}
-
-/* STRING:VOID (marshal_types:8) */
-void
-g_cclosure_user_marshal_STRING__VOID (GClosure     *closure,
-                                      GValue       *return_value G_GNUC_UNUSED,
-                                      guint         n_param_values,
-                                      const GValue *param_values,
-                                      gpointer      invocation_hint G_GNUC_UNUSED,
-                                      gpointer      marshal_data)
-{
-  typedef gchar* (*GMarshalFunc_STRING__VOID) (gpointer     data1,
-                                               gpointer     data2);
-  register GMarshalFunc_STRING__VOID callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gchar* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 1);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_STRING__VOID) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       data2);
-
-  g_value_take_string (return_value, v_return);
-}
-
-/* INT:STRING (marshal_types:11) */
-
-/* STRING:BOOL (marshal_types:13) */
-void
-g_cclosure_user_marshal_STRING__BOOLEAN (GClosure     *closure,
-                                         GValue       *return_value G_GNUC_UNUSED,
-                                         guint         n_param_values,
-                                         const GValue *param_values,
-                                         gpointer      invocation_hint G_GNUC_UNUSED,
-                                         gpointer      marshal_data)
-{
-  typedef gchar* (*GMarshalFunc_STRING__BOOLEAN) (gpointer     data1,
-                                                  gboolean     arg_1,
-                                                  gpointer     data2);
-  register GMarshalFunc_STRING__BOOLEAN callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gchar* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_STRING__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_boolean (param_values + 1),
-                       data2);
-
-  g_value_take_string (return_value, v_return);
-}
-
-/* STRING:INT (marshal_types:14) */
-void
-g_cclosure_user_marshal_STRING__INT (GClosure     *closure,
-                                     GValue       *return_value G_GNUC_UNUSED,
-                                     guint         n_param_values,
-                                     const GValue *param_values,
-                                     gpointer      invocation_hint G_GNUC_UNUSED,
-                                     gpointer      marshal_data)
-{
-  typedef gchar* (*GMarshalFunc_STRING__INT) (gpointer     data1,
-                                              gint         arg_1,
-                                              gpointer     data2);
-  register GMarshalFunc_STRING__INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gchar* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_STRING__INT) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_int (param_values + 1),
-                       data2);
-
-  g_value_take_string (return_value, v_return);
-}
-
-/* STRING:STRING (marshal_types:15) */
-void
-g_cclosure_user_marshal_STRING__STRING (GClosure     *closure,
-                                        GValue       *return_value G_GNUC_UNUSED,
-                                        guint         n_param_values,
-                                        const GValue *param_values,
-                                        gpointer      invocation_hint G_GNUC_UNUSED,
-                                        gpointer      marshal_data)
-{
-  typedef gchar* (*GMarshalFunc_STRING__STRING) (gpointer     data1,
-                                                 gpointer     arg_1,
-                                                 gpointer     data2);
-  register GMarshalFunc_STRING__STRING callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-  gchar* v_return;
-
-  g_return_if_fail (return_value != NULL);
-  g_return_if_fail (n_param_values == 2);
-
-  if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-      data1 = closure->data;
-      data2 = g_value_peek_pointer (param_values + 0);
-    }
-  else
-    {
-      data1 = g_value_peek_pointer (param_values + 0);
-      data2 = closure->data;
-    }
-  callback = (GMarshalFunc_STRING__STRING) (marshal_data ? marshal_data : cc->callback);
-
-  v_return = callback (data1,
-                       g_marshal_value_peek_string (param_values + 1),
-                       data2);
-
-  g_value_take_string (return_value, v_return);
-}
-
Index: arshal_funcs.h
===================================================================
--- gmarshal_funcs.h	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ 	(revision )
@@ -1,89 +1,0 @@
-
-#ifndef __g_cclosure_user_marshal_MARSHAL_H__
-#define __g_cclosure_user_marshal_MARSHAL_H__
-
-#include	<glib-object.h>
-
-G_BEGIN_DECLS
-
-/* INT:STRING (marshal_types:2) */
-extern void g_cclosure_user_marshal_INT__STRING (GClosure     *closure,
-                                                 GValue       *return_value,
-                                                 guint         n_param_values,
-                                                 const GValue *param_values,
-                                                 gpointer      invocation_hint,
-                                                 gpointer      marshal_data);
-
-/* INT:INT (marshal_types:3) */
-extern void g_cclosure_user_marshal_INT__INT (GClosure     *closure,
-                                              GValue       *return_value,
-                                              guint         n_param_values,
-                                              const GValue *param_values,
-                                              gpointer      invocation_hint,
-                                              gpointer      marshal_data);
-
-/* INT:BOOL (marshal_types:4) */
-extern void g_cclosure_user_marshal_INT__BOOLEAN (GClosure     *closure,
-                                                  GValue       *return_value,
-                                                  guint         n_param_values,
-                                                  const GValue *param_values,
-                                                  gpointer      invocation_hint,
-                                                  gpointer      marshal_data);
-#define g_cclosure_user_marshal_INT__BOOL	g_cclosure_user_marshal_INT__BOOLEAN
-
-/* INT:VOID (marshal_types:6) */
-extern void g_cclosure_user_marshal_INT__VOID (GClosure     *closure,
-                                               GValue       *return_value,
-                                               guint         n_param_values,
-                                               const GValue *param_values,
-                                               gpointer      invocation_hint,
-                                               gpointer      marshal_data);
-
-/* BOOL:VOID (marshal_types:7) */
-extern void g_cclosure_user_marshal_BOOLEAN__VOID (GClosure     *closure,
-                                                   GValue       *return_value,
-                                                   guint         n_param_values,
-                                                   const GValue *param_values,
-                                                   gpointer      invocation_hint,
-                                                   gpointer      marshal_data);
-#define g_cclosure_user_marshal_BOOL__VOID	g_cclosure_user_marshal_BOOLEAN__VOID
-
-/* STRING:VOID (marshal_types:8) */
-extern void g_cclosure_user_marshal_STRING__VOID (GClosure     *closure,
-                                                  GValue       *return_value,
-                                                  guint         n_param_values,
-                                                  const GValue *param_values,
-                                                  gpointer      invocation_hint,
-                                                  gpointer      marshal_data);
-
-/* INT:STRING (marshal_types:11) */
-
-/* STRING:BOOL (marshal_types:13) */
-extern void g_cclosure_user_marshal_STRING__BOOLEAN (GClosure     *closure,
-                                                     GValue       *return_value,
-                                                     guint         n_param_values,
-                                                     const GValue *param_values,
-                                                     gpointer      invocation_hint,
-                                                     gpointer      marshal_data);
-#define g_cclosure_user_marshal_STRING__BOOL	g_cclosure_user_marshal_STRING__BOOLEAN
-
-/* STRING:INT (marshal_types:14) */
-extern void g_cclosure_user_marshal_STRING__INT (GClosure     *closure,
-                                                 GValue       *return_value,
-                                                 guint         n_param_values,
-                                                 const GValue *param_values,
-                                                 gpointer      invocation_hint,
-                                                 gpointer      marshal_data);
-
-/* STRING:STRING (marshal_types:15) */
-extern void g_cclosure_user_marshal_STRING__STRING (GClosure     *closure,
-                                                    GValue       *return_value,
-                                                    guint         n_param_values,
-                                                    const GValue *param_values,
-                                                    gpointer      invocation_hint,
-                                                    gpointer      marshal_data);
-
-G_END_DECLS
-
-#endif /* __g_cclosure_user_marshal_MARSHAL_H__ */
-
Index: marshal_types
===================================================================
--- marshal_types	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ marshal_types	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -1,16 +1,4 @@
-# set_fn
-INT:STRING
-INT:INT
-INT:BOOL
-# get_fn
-INT:VOID
-BOOL:VOID
-STRING:VOID
-# validate_fn has same signature as set_fn
 # set_fromstring_fn
 INT:STRING
 # get_tostring_fn
-STRING:BOOL
-STRING:INT
-STRING:STRING
-
+STRING:VOID
Index: owl.h
===================================================================
--- owl.h	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ owl.h	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -235,17 +235,9 @@
   char *name;
   int   type;  /* OWL_VARIABLE_* */
-  GValue gval_default;
+  char *default_str;            /* the default value as a string */
   const char *validsettings;	/* documentation of valid settings */
   char *summary;		/* summary of usage */
   char *description;		/* detailed description */
   GValue val;                    /* current value */
-  GClosure *validate_fn;
-                                /* returns 1 if newval is valid */
-  GClosure *set_fn;
-                                /* sets the variable to a value
-				 * of the appropriate type.
-				 * unless documented, this 
-				 * should make a copy. 
-				 * returns 0 on success. */
   GClosure *set_fromstring_fn;
                                 /* sets the variable to a value
@@ -254,26 +246,31 @@
 				 * should make a copy. 
 				 * returns 0 on success. */
-  GClosure *get_fn;
+  GClosure *get_tostring_fn;
+                                /* converts val to a string;
+				 * caller must free the result */
+
+  /* These are only valid for OWL_VARIABLE_{INT,BOOL,STRING} */
+  GCallback get_fn;
 				/* returns a reference to the current value.
 				 * WARNING:  this approach is hard to make
 				 * thread-safe... */
-  GClosure *get_tostring_fn;
-                                /* converts val to a string;
-				 * caller must free the result */
-  GClosure *delete_fn;
-				/* frees val as needed */
-  GClosure *get_default_fn;
-                               /* return the default value, as set at creation time */
-  
+  GCallback validate_fn;
+                                /* returns 1 if newval is valid */
+  GCallback set_fn;
+                                /* sets the variable to a value
+				 * of the appropriate type.
+				 * unless documented, this 
+				 * should make a copy. 
+				 * returns 0 on success. */
 } owl_variable;
 
 typedef struct _owl_variable_init_params {
-  char *name;
+  const char *name;
   int   type;  /* OWL_VARIABLE_* */
-  void *pval_default;  /* for types other and string */
-  int   ival_default;  /* for types int and bool     */
+  const char *pval_default;     /* for string */
+  int   ival_default;           /* for types int and bool     */
   const char *validsettings;	/* documentation of valid settings */
-  char *summary;		/* summary of usage */
-  char *description;		/* detailed description */
+  const char *summary;		/* summary of usage */
+  const char *description;	/* detailed description */
   void *val;                    /* current value */
   GCallback validate_fn;
@@ -298,8 +295,4 @@
                                 /* converts val to a string;
 				 * caller must free the result */
-  GCallback delete_fn;
-				/* frees val as needed */
-  GCallback get_default_fn;
-				/* return the default value as set at creation time */
 } owl_variable_init_params;
 
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ perlconfig.c	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -559,10 +559,2 @@
   SvREFCNT_dec(v);
 }
-
-void owl_perl_delete_perl_variable(owl_variable *variable, void *data)
-{
-  g_closure_unref(variable->delete_fn);
-  variable->delete_fn = NULL;
-  SvREFCNT_dec((SV*)data);
-  owl_variable_delete(variable);
-}
Index: perlglue.xs
===================================================================
--- perlglue.xs	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ perlglue.xs	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -405,4 +405,5 @@
 MODULE = BarnOwl		PACKAGE = BarnOwl::Internal
 
+/* TODO: Revise this after churn is done.
 void
 new_variable_full(name, summary, desc, type, data, default_val, get_fn, get_default_fn, tostring_fn, validate_fn, set_fn, fromstring_fn)
@@ -474,4 +475,5 @@
 	PUTBACK;
 }
+*/
 
 void
Index: tester.c
===================================================================
--- tester.c	(revision 6a209963395d62d98c3d6b52daa6fb2e3054ae1b)
+++ tester.c	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -337,5 +337,4 @@
   int numfailed=0;
   char *value;
-  const void *v;
 
   printf("# BEGIN testing owl_variable\n");
@@ -379,5 +378,4 @@
   owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval");
   FAIL_UNLESS("get new string var", NULL != (var = owl_variable_get_var(&vd, "stringvar")));
-  FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(var)));
   FAIL_UNLESS("get new string val", !strcmp("testval", owl_variable_get_string(var)));
   owl_variable_set_string(var, "new val");
@@ -386,5 +384,4 @@
   owl_variable_dict_newvar_int(&vd, "intvar", "", "", 47);
   FAIL_UNLESS("get new int var", NULL != (var = owl_variable_get_var(&vd, "intvar")));
-  FAIL_UNLESS("get new int var", NULL != (v = owl_variable_get(var)));
   FAIL_UNLESS("get new int val", 47 == owl_variable_get_int(var));
   owl_variable_set_int(var, 17);
@@ -393,5 +390,4 @@
   owl_variable_dict_newvar_bool(&vd, "boolvar", "", "", 1);
   FAIL_UNLESS("get new bool var", NULL != (var = owl_variable_get_var(&vd, "boolvar")));
-  FAIL_UNLESS("get new bool var", NULL != (v = owl_variable_get(var)));
   FAIL_UNLESS("get new bool val", owl_variable_get_bool(var));
   owl_variable_set_bool_off(var);
Index: variable.c
===================================================================
--- variable.c	(revision 06e04a995f32e4c88df08bff7baf37fb5bc8a59c)
+++ variable.c	(revision 353719a2ddec4d6a8458ee42af37514fedbd80bf)
@@ -3,35 +3,48 @@
 #include "gmarshal_funcs.h"
 
-static const GType owl_variable_gtype_map[] = {G_TYPE_POINTER, 
-					       G_TYPE_INT, G_TYPE_BOOLEAN,
-					       G_TYPE_STRING };
+/* TODO(davidben): When we can require 2.30 and up, remove this. */
+#ifndef G_VALUE_INIT
+#define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
+typedef const char *(*get_string_t)(const owl_variable *);
+typedef int (*get_int_t)(const owl_variable *);
+typedef gboolean (*get_bool_t)(const owl_variable *);
+
+typedef int (*set_string_t)(owl_variable *, const char *);
+typedef int (*set_int_t)(owl_variable *, int);
+typedef int (*set_bool_t)(owl_variable *, gboolean);
+
+typedef int (*validate_string_t)(owl_variable *, const char *);
+typedef int (*validate_int_t)(owl_variable *, int);
+typedef int (*validate_bool_t)(owl_variable *, gboolean);
 
 #define OWLVAR_BOOL(name,default,summary,description) \
-        { g_strdup(name), OWL_VARIABLE_BOOL, NULL, default, "on,off", g_strdup(summary), g_strdup(description), NULL, \
-	    NULL, NULL, NULL, NULL, NULL, NULL, NULL }
+        { name, OWL_VARIABLE_BOOL, NULL, default, "on,off", summary, description, NULL, \
+	    NULL, NULL, NULL, NULL, NULL }
 
 #define OWLVAR_BOOL_FULL(name,default,summary,description,validate,set,get) \
-        { g_strdup(name), OWL_VARIABLE_BOOL, NULL, default, "on,off", g_strdup(summary), g_strdup(description), NULL, \
-	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL, NULL, NULL }
+        { name, OWL_VARIABLE_BOOL, NULL, default, "on,off", summary, description, NULL, \
+	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL }
 
 #define OWLVAR_INT(name,default,summary,description) \
-        { g_strdup(name), OWL_VARIABLE_INT, NULL, default, "<int>", g_strdup(summary), g_strdup(description), NULL, \
-	    NULL, NULL, NULL, NULL, NULL, NULL, NULL }
+        { name, OWL_VARIABLE_INT, NULL, default, "<int>", summary, description, NULL, \
+	    NULL, NULL, NULL, NULL, NULL }
 
 #define OWLVAR_INT_FULL(name,default,summary,description,validset,validate,set,get) \
-        { g_strdup(name), OWL_VARIABLE_INT, NULL, default, validset, g_strdup(summary), g_strdup(description), NULL, \
-	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL, NULL, NULL }
+        { name, OWL_VARIABLE_INT, NULL, default, validset, summary, description, NULL, \
+	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL }
 
 #define OWLVAR_PATH(name,default,summary,description) \
-        { g_strdup(name), OWL_VARIABLE_STRING, g_strdup(default), 0, "<path>", g_strdup(summary), g_strdup(description),  NULL, \
-	    NULL, NULL, NULL, NULL, NULL, NULL, NULL }
+        { name, OWL_VARIABLE_STRING, default, 0, "<path>", summary, description,  NULL, \
+	    NULL, NULL, NULL, NULL, NULL }
 
 #define OWLVAR_STRING(name,default,summary,description) \
-        { g_strdup(name), OWL_VARIABLE_STRING, g_strdup(default), 0, "<string>", g_strdup(summary), g_strdup(description), NULL, \
-	    NULL, NULL, NULL, NULL, NULL, NULL, NULL }
+        { name, OWL_VARIABLE_STRING, default, 0, "<string>", summary, description, NULL, \
+	    NULL, NULL, NULL, NULL, NULL }
 
 #define OWLVAR_STRING_FULL(name,default,validset,summary,description,validate,set,get) \
-        { g_strdup(name), OWL_VARIABLE_STRING, g_strdup(default), 0, validset, g_strdup(summary), g_strdup(description), NULL, \
-	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL, NULL, NULL }
+        { name, OWL_VARIABLE_STRING, default, 0, validset, summary, description, NULL, \
+	    G_CALLBACK(validate), G_CALLBACK(set), NULL, G_CALLBACK(get), NULL }
 
 /* enums are really integers, but where validset is a comma-separated
@@ -39,16 +52,16 @@
  * correspond to the values that may be specified. */
 #define OWLVAR_ENUM(name,default,summary,description,validset) \
-        { g_strdup(name), OWL_VARIABLE_INT, NULL, default, validset, g_strdup(summary), g_strdup(description), NULL, \
+        { name, OWL_VARIABLE_INT, NULL, default, validset, summary, description, NULL, \
 	    G_CALLBACK(owl_variable_enum_validate),			\
 	    NULL, G_CALLBACK(owl_variable_enum_set_fromstring),		\
 	    NULL, G_CALLBACK(owl_variable_enum_get_tostring),		\
-	    NULL, NULL }
+	    }
 
 #define OWLVAR_ENUM_FULL(name,default,summary,description,validset,validate, set, get) \
-        { g_strdup(name), OWL_VARIABLE_INT, NULL, default, validset, g_strdup(summary), g_strdup(description), NULL, \
+        { name, OWL_VARIABLE_INT, NULL, default, validset, summary, description, NULL, \
 	    G_CALLBACK(validate),					\
 	    G_CALLBACK(set), G_CALLBACK(owl_variable_enum_set_fromstring), \
 	    G_CALLBACK(get), G_CALLBACK(owl_variable_enum_get_tostring), \
-	    NULL, NULL }
+	    }
 
 int owl_variable_add_defaults(owl_vardict *vd)
@@ -439,13 +452,9 @@
   /* This MUST be last... */
   { NULL, 0, NULL, 0, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL, NULL, NULL }
+    NULL, NULL, NULL, NULL, NULL }
 
   };
 
-  int ret = owl_variable_dict_add_from_list(vd, variables_to_init);
-  owl_variable_init_params *var;
-  for (var = variables_to_init; var->name != NULL; var++)
-    owl_variable_cleanup_initializer(var);
-  return ret;
+  return owl_variable_dict_add_from_list(vd, variables_to_init);
 }
 
@@ -457,10 +466,10 @@
 /* commonly useful */
 
-int owl_variable_int_validate_gt0(const owl_variable *v, const int newval, void *dummy)
+int owl_variable_int_validate_gt0(const owl_variable *v, int newval)
 {
   return !(newval < 1);
 }
 
-int owl_variable_int_validate_positive(const owl_variable *v, const int newval, void *dummy)
+int owl_variable_int_validate_positive(const owl_variable *v, int newval)
 {
   return !(newval < 0);
@@ -468,8 +477,8 @@
 
 /* typewinsize */
-int owl_variable_typewinsize_set(owl_variable *v, const int newval, void *dummy)
+int owl_variable_typewinsize_set(owl_variable *v, int newval)
 {
   int rv;
-  rv = owl_variable_int_set_default(v, newval, dummy);
+  rv = owl_variable_int_set_default(v, newval);
   if (0 == rv) owl_mainpanel_layout_contents(&g.mainpanel);
   return(rv);
@@ -477,14 +486,14 @@
 
 /* debug (cache value in g->debug) */
-int owl_variable_debug_set(owl_variable *v, const int newval, void *dummy)
+int owl_variable_debug_set(owl_variable *v, int newval)
 {
   if (newval == 1 || newval == 0) {
     g.debug = newval;
   }
-  return owl_variable_bool_set_default(v, newval, dummy);
+  return owl_variable_bool_set_default(v, newval);
 }
 
 /* When 'aaway' is changed, need to notify the AIM server */
-int owl_variable_aaway_set(owl_variable *v, const gboolean newval, void *dummy)
+int owl_variable_aaway_set(owl_variable *v, gboolean newval)
 {
   if (newval == 1) {
@@ -493,10 +502,10 @@
     owl_aim_set_awaymsg("");
   }
-  return owl_variable_bool_set_default(v, newval, dummy);
-}
-
-int owl_variable_colorztext_set(owl_variable *v, const void *newval, void *dummy)
-{
-  int ret = owl_variable_bool_set_default(v, newval, dummy);
+  return owl_variable_bool_set_default(v, newval);
+}
+
+int owl_variable_colorztext_set(owl_variable *v, const void *newval)
+{
+  int ret = owl_variable_bool_set_default(v, newval);
   /* flush the format cache so that we see the update, but only if we're done initializing BarnOwl */
   if (owl_global_get_msglist(&g) != NULL)
@@ -509,5 +518,5 @@
 }
 
-int owl_variable_pseudologins_set(owl_variable *v, const int newval, void *dummy)
+int owl_variable_pseudologins_set(owl_variable *v, int newval)
 {
   static guint timer = 0;
@@ -523,10 +532,10 @@
     }
   }
-  return owl_variable_bool_set_default(v, newval, dummy);
+  return owl_variable_bool_set_default(v, newval);
 }
 
 /* note that changing the value of this will clobber 
  * any user setting of this */
-int owl_variable_disable_ctrl_d_set(owl_variable *v, const int newval, void *dummy)
+int owl_variable_disable_ctrl_d_set(owl_variable *v, int newval)
 {
   if (!owl_context_is_startup(owl_global_get_context(&g))) {
@@ -539,29 +548,29 @@
     }
   }  
-  return owl_variable_int_set_default(v, newval, dummy);  
-}
-
-int owl_variable_tty_set(owl_variable *v, const char *newval, void *dummy)
+  return owl_variable_int_set_default(v, newval);
+}
+
+int owl_variable_tty_set(owl_variable *v, const char *newval)
 {
   owl_zephyr_set_locationinfo(g_get_host_name(), newval);
-  return(owl_variable_string_set_default(v, newval, dummy));
-}
-
-int owl_variable_default_exposure_set(owl_variable *v, const char *newval, void *dummy)
+  return owl_variable_string_set_default(v, newval);
+}
+
+int owl_variable_default_exposure_set(owl_variable *v, const char *newval)
 {
   return owl_zephyr_set_default_exposure(newval);
 }
 
-const char *owl_variable_default_exposure_get(const owl_variable *v, void *dummy)
+const char *owl_variable_default_exposure_get(const owl_variable *v)
 {
   return owl_zephyr_get_default_exposure();
 }
 
-int owl_variable_exposure_set(owl_variable *v, const char *newval, void *dummy)
+int owl_variable_exposure_set(owl_variable *v, const char *newval)
 {
   int ret = owl_zephyr_set_exposure(newval);
   if (ret != 0)
     return ret;
-  return owl_variable_string_set_default(v, owl_zephyr_normalize_exposure(newval), dummy);
+  return owl_variable_string_set_default(v, owl_zephyr_normalize_exposure(newval));
 }
 
@@ -576,7 +585,7 @@
 
 CALLER_OWN GClosure *owl_variable_make_closure(owl_variable *v,
-                                                      GCallback fn,
-                                                      GClosureMarshal marshal) {
-  GClosure *closure = g_cclosure_new(fn, NULL, NULL);
+                                               GCallback fn,
+                                               GClosureMarshal marshal) {
+  GClosure *closure = g_cclosure_new_swap(fn, v, NULL);
   g_closure_set_marshal(closure,marshal);
   g_closure_ref(closure);
@@ -594,5 +603,12 @@
 						  marshal_func);	\
   } while(0)
-  
+
+#define DEFAULT_CB(a, b) (a ? a : G_CALLBACK(b))
+
+#define SET_CBS(type) \
+      newvar->get_fn = DEFAULT_CB(init_params->get_fn, owl_variable_##type##_get_default); \
+      newvar->set_fn = DEFAULT_CB(init_params->set_fn, owl_variable_##type##_set_default); \
+      newvar->validate_fn = \
+        DEFAULT_CB(init_params->validate_fn, owl_variable_##type##_validate_default);
 
 int owl_variable_dict_add_from_list(owl_vardict *vd, owl_variable_init_params *variables_to_init)
@@ -608,19 +624,8 @@
     newvar->description = g_strdup(init_params->description);
     newvar->validsettings = init_params->validsettings;
-    GValue values[] = {{0}, {0}};
-    GValue *value = values+1;
-    GValue ret = {0};
     GCallback fn = NULL;
     switch (init_params->type) {
     case OWL_VARIABLE_STRING:
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_fn, 
-                              G_CALLBACK(owl_variable_string_get_default), 
-                              g_cclosure_user_marshal_STRING__VOID, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fn, 
-                              G_CALLBACK(owl_variable_string_set_default), 
-                              g_cclosure_user_marshal_INT__STRING, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, validate_fn,
-                              G_CALLBACK(owl_variable_string_validate_default),
-                              g_cclosure_user_marshal_INT__STRING, fn);
+      SET_CBS(string);
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fromstring_fn,
                               G_CALLBACK(owl_variable_string_set_fromstring_default),
@@ -628,22 +633,11 @@
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_tostring_fn,
                               G_CALLBACK(owl_variable_string_get_tostring_default),
-                              g_cclosure_user_marshal_STRING__STRING, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_default_fn, 
-                              G_CALLBACK(owl_variable_string_get_default_default), 
                               g_cclosure_user_marshal_STRING__VOID, fn);
 
-      g_value_init(value,G_TYPE_STRING);
-      g_value_set_string(value, init_params->pval_default);
+      g_value_init(&newvar->val, G_TYPE_STRING);
+      owl_variable_set_string(newvar, init_params->pval_default);
       break;
     case OWL_VARIABLE_BOOL:
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_fn, 
-                              G_CALLBACK(owl_variable_bool_get_default), 
-                              g_cclosure_user_marshal_BOOLEAN__VOID, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fn, 
-                              G_CALLBACK(owl_variable_bool_set_default), 
-                              g_cclosure_user_marshal_INT__BOOLEAN, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, validate_fn,
-                              G_CALLBACK(owl_variable_bool_validate_default),
-                              g_cclosure_user_marshal_INT__BOOLEAN, fn);
+      SET_CBS(bool);
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fromstring_fn,
                               G_CALLBACK(owl_variable_bool_set_fromstring_default),
@@ -651,22 +645,11 @@
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_tostring_fn,
                               G_CALLBACK(owl_variable_bool_get_tostring_default),
-                              g_cclosure_user_marshal_STRING__BOOLEAN, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_default_fn,
-                              G_CALLBACK(owl_variable_bool_get_default_default),
-                              g_cclosure_user_marshal_BOOLEAN__VOID, fn);
-
-      g_value_init(value,G_TYPE_BOOLEAN);
-      g_value_set_boolean(value, !!(init_params->ival_default));
+                              g_cclosure_user_marshal_STRING__VOID, fn);
+
+      g_value_init(&newvar->val, G_TYPE_BOOLEAN);
+      owl_variable_set_bool(newvar, !!(init_params->ival_default));
       break;
     case OWL_VARIABLE_INT:
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_fn, 
-                              G_CALLBACK(owl_variable_int_get_default), 
-                              g_cclosure_user_marshal_INT__VOID, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fn, 
-                              G_CALLBACK(owl_variable_int_set_default), 
-                              g_cclosure_user_marshal_INT__INT, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, validate_fn,
-                              G_CALLBACK(owl_variable_int_validate_default),
-                              g_cclosure_user_marshal_INT__INT, fn);
+      SET_CBS(int);
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, set_fromstring_fn,
                               G_CALLBACK(owl_variable_int_set_fromstring_default),
@@ -674,11 +657,8 @@
       OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_tostring_fn,
                               G_CALLBACK(owl_variable_int_get_tostring_default),
-                              g_cclosure_user_marshal_STRING__INT, fn);
-      OWL_VARIABLE_SETUP_FUNC(newvar, init_params, get_default_fn, 
-                              G_CALLBACK(owl_variable_int_get_default_default), 
-                              g_cclosure_user_marshal_INT__VOID, fn);
-
-      g_value_init(value,G_TYPE_INT);
-      g_value_set_int(value, init_params->ival_default);
+                              g_cclosure_user_marshal_STRING__VOID, fn);
+
+      g_value_init(&newvar->val, G_TYPE_INT);
+      owl_variable_set_int(newvar, init_params->ival_default);
       break;
     default:
@@ -686,17 +666,8 @@
       return(-2);
     }
-    OWL_VARIABLE_SETUP_FUNC(newvar, init_params, delete_fn, 
-                            G_CALLBACK(owl_variable_delete_default),
-                            g_cclosure_marshal_VOID__VOID, fn);
-    
-    g_value_init(&(newvar->gval_default), G_VALUE_TYPE(value));
-    g_value_init(&(newvar->val), G_VALUE_TYPE(value));
-    g_value_copy(value, &(newvar->gval_default));
-    /* we have the value boxed up already *anyway*, so... */
-    g_value_init(values, G_TYPE_POINTER);
-    g_value_set_pointer(values, newvar);
-    g_value_init(&ret, G_TYPE_INT);
-    g_closure_invoke(newvar->set_fn, &ret, 2, values, NULL);
-    g_value_unset(value);
+
+    /* record the initial value as a string */
+    newvar->default_str = owl_variable_get_tostring(newvar);
+
     owl_dict_insert_element(vd, newvar->name, newvar, NULL);
   }
@@ -726,13 +697,7 @@
 
 #define OWL_VARIABLE_SETUP_DEFAULT_FUNCS(variable, type, gtype) do { \
-  variable->set_fn = owl_variable_make_closure(variable, \
-    G_CALLBACK(owl_variable_##type##_set_default), \
-    g_cclosure_user_marshal_INT__##gtype); \
-  variable->get_fn = owl_variable_make_closure(variable, \
-    G_CALLBACK(owl_variable_##type##_get_default), \
-    g_cclosure_user_marshal_##gtype##__##VOID); \
-  variable->validate_fn = owl_variable_make_closure(variable, \
-    G_CALLBACK(owl_variable_##type##_validate_default), \
-    g_cclosure_user_marshal_INT__##gtype); \
+  variable->set_fn = G_CALLBACK(owl_variable_##type##_set_default); \
+  variable->get_fn = G_CALLBACK(owl_variable_##type##_get_default); \
+  variable->validate_fn = G_CALLBACK(owl_variable_##type##_validate_default); \
   variable->set_fromstring_fn = owl_variable_make_closure(variable, \
     G_CALLBACK(owl_variable_##type##_set_fromstring_default), \
@@ -740,34 +705,27 @@
   variable->get_tostring_fn = owl_variable_make_closure(variable, \
     G_CALLBACK(owl_variable_##type##_get_tostring_default), \
-    g_cclosure_user_marshal_STRING__##gtype); \
-  variable->get_default_fn = owl_variable_make_closure(variable, \
-    G_CALLBACK(owl_variable_##type##_get_default_default), \
-    g_cclosure_user_marshal_##gtype##__##VOID); \
-  } while(0);
+    g_cclosure_user_marshal_STRING__VOID); \
+  } while(0)
 
 void owl_variable_dict_newvar_string(owl_vardict *vd, const char *name, const char *summ, const char *desc, const char *initval)
 {
-  GValue default_gvals[] = {{0}, {0}};
-  GValue *default_gval = default_gvals+1;
-  GValue retval = {0}; 
-  g_value_init(default_gval, G_TYPE_STRING);
-  g_value_init(&retval, G_TYPE_INT);
-  g_value_set_static_string(default_gval, initval);
   owl_variable *old = owl_variable_get_var(vd, name);
   if (old && owl_variable_get_type(old) == OWL_VARIABLE_STRING) {
     owl_variable_update(old, summ, desc);
-    g_value_copy(default_gval, &(old->gval_default));
+    /* g_value_copy(default_gval, &(old->gval_default)); */
+    /* TODO: Resolve this after churn; this function is only called from perl
+     * anyway. */
   } else {
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_STRING;
     var->validsettings = "<string>";
-    g_value_init(&(var->val), G_TYPE_STRING);
-    g_value_init(default_gvals, G_TYPE_POINTER);
-    g_value_set_pointer(default_gvals, var);
-    g_value_init(&(var->gval_default), G_TYPE_STRING);
-    g_value_set_string(&(var->gval_default), initval);
+    g_value_init(&var->val, G_TYPE_STRING);
     OWL_VARIABLE_SETUP_DEFAULT_FUNCS(var, string, STRING);
 
-    g_closure_invoke(var->set_fn, &retval, 2, default_gvals, NULL);
+    owl_variable_set_string(var, initval);
+
+    /* record the initial value as a string */
+    var->default_str = owl_variable_get_tostring(var);
+
     owl_variable_dict_add_variable(vd, var);
   }
@@ -776,26 +734,22 @@
 void owl_variable_dict_newvar_int(owl_vardict *vd, const char *name, const char *summ, const char *desc, int initval)
 {
-  GValue default_gvals[] = {{0}, {0}};
-  GValue *default_gval = default_gvals+1;
-  GValue retval = {0}; 
-  g_value_init(default_gval, G_TYPE_INT);
-  g_value_init(&retval, G_TYPE_INT);
-  g_value_set_int(default_gval, initval);
   owl_variable *old = owl_variable_get_var(vd, name);
   if (old && owl_variable_get_type(old) == OWL_VARIABLE_INT) {
     owl_variable_update(old, summ, desc);
-    g_value_copy(default_gval, &(old->gval_default));
+    /* g_value_copy(default_gval, &(old->gval_default)); */
+    /* TODO: Resolve this after churn; this function is only called from perl
+     * anyway. */
   } else {
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_INT;
     var->validsettings = "<int>";
-    g_value_init(&(var->val), G_TYPE_INT);
-    g_value_init(&(var->gval_default), G_TYPE_INT);
+    g_value_init(&var->val, G_TYPE_INT);
     OWL_VARIABLE_SETUP_DEFAULT_FUNCS(var, int, INT);
-    g_value_init(default_gvals, G_TYPE_POINTER);
-    g_value_set_pointer(default_gvals, var);
-    g_value_set_int(&(var->gval_default), initval);
-    g_closure_invoke(var->set_fn, &retval, 2, default_gvals, NULL);
-    /*    g_value_unset(&retval); */
+
+    owl_variable_set_int(var, initval);
+
+    /* record the initial value as a string */
+    var->default_str = owl_variable_get_tostring(var);
+
     owl_variable_dict_add_variable(vd, var);
   }
@@ -804,26 +758,22 @@
 void owl_variable_dict_newvar_bool(owl_vardict *vd, const char *name, const char *summ, const char *desc, gboolean initval)
 {
-  GValue default_gvals[] = {{0}, {0}};
-  GValue *default_gval = default_gvals+1;
-  GValue retval = {0}; 
-  g_value_init(default_gval, G_TYPE_BOOLEAN);
-  g_value_init(&retval, G_TYPE_INT);
-  g_value_set_boolean(default_gval, initval);
   owl_variable *old = owl_variable_get_var(vd, name);
   if (old && owl_variable_get_type(old) == OWL_VARIABLE_BOOL) {
     owl_variable_update(old, summ, desc);
-    g_value_copy(default_gval, &(old->gval_default));
+    /* g_value_copy(default_gval, &(old->gval_default)); */
+    /* TODO: Resolve this after churn; this function is only called from perl
+     * anyway. */
   } else {
     owl_variable * var = owl_variable_newvar(name, summ, desc);
     var->type = OWL_VARIABLE_BOOL;
     var->validsettings = "on,off";
-    g_value_init(&(var->val), G_TYPE_BOOLEAN);
-    g_value_init(&(var->gval_default), G_TYPE_BOOLEAN);
+    g_value_init(&var->val, G_TYPE_BOOLEAN);
     OWL_VARIABLE_SETUP_DEFAULT_FUNCS(var, bool, BOOLEAN);
 
-    g_value_init(default_gvals, G_TYPE_POINTER);
-    g_value_set_pointer(default_gvals, var);
-    g_value_set_int(&(var->gval_default), initval);
-    g_closure_invoke(var->set_fn, &retval, 2, default_gvals, NULL);  
+    owl_variable_set_bool(var, initval);
+
+    /* record the initial value as a string */
+    var->default_str = owl_variable_get_tostring(var);
+
     owl_variable_dict_add_variable(vd, var);
   }
@@ -841,30 +791,12 @@
 void owl_variable_cleanup(owl_variable *v)
 {
-  GValue val = {0};
-  if (v->delete_fn) {
-    g_value_init(&val, G_TYPE_POINTER);
-    g_value_set_pointer(&val, v);
-    g_closure_invoke(v->delete_fn, NULL, 1, &val, NULL);
-  }
   g_free(v->name);
   g_free(v->summary);
   g_free(v->description);
-  if (v->type == OWL_VARIABLE_STRING) {
-    g_value_unset(&v->gval_default);
-  }
-  g_closure_unref(v->get_fn);
-  g_closure_unref(v->set_fn);
-  g_closure_unref(v->validate_fn);
+  g_free(v->default_str);
+  g_value_unset(&(v->val));
   g_closure_unref(v->get_tostring_fn);
   g_closure_unref(v->set_fromstring_fn);
 }
- 
-void owl_variable_cleanup_initializer(owl_variable_init_params *v) {
-  g_free(v->name);
-  g_free(v->summary);
-  g_free(v->description);
-  if (v->type == OWL_VARIABLE_STRING)
-    g_free(v->pval_default);
- }
 
 void owl_variable_delete(owl_variable *v)
@@ -895,37 +827,4 @@
 {
   return v->type;
-}
-
-/* functions for getting and setting variable values */
-
-static CALLER_OWN  char *owl_variable_invoke_tostring(const owl_variable *v,
-						     const GValue *value) 
-{
-  GValue values[] = { {0}, {0}};
-  GValue *value_box = values+1;
-  GValue tostring_box = {0};
-  char *ret = NULL;
-  gboolean need_to_free = false;
-
-  g_value_init(values, G_TYPE_POINTER);
-  g_value_set_pointer(values, (gpointer)v);
-  g_value_init(&tostring_box, G_TYPE_STRING);
-  if(value) {
-    g_value_init(value_box, G_VALUE_TYPE(value));
-    g_value_copy(value, value_box);
-    need_to_free = true;
-  } else {
-    g_value_init(value_box, owl_variable_gtype_map[v->type]);
-    g_closure_invoke(v->get_fn, value_box, 1, values, NULL);
-  }
-  g_closure_invoke(v->get_tostring_fn,&tostring_box, 2, values, NULL);
-
-  ret = g_value_dup_string(&tostring_box);
-  g_value_unset(&tostring_box);
-  if(need_to_free) {
-    g_value_unset(value_box);
-  }
-
-  return ret;
 }
 
@@ -933,7 +832,7 @@
 int owl_variable_set_fromstring(owl_variable *v, const char *value, int msg) {
   char *tostring;
-  GValue values[] = {{0},{0},{0}};
-  GValue *value_box = values+1;
-  GValue return_box = {0};
+  GValue values[] = {G_VALUE_INIT, G_VALUE_INIT};
+  GValue *value_box = &values[1];
+  GValue return_box = G_VALUE_INIT;
   int set_successfully = -1;
   if (!v->set_fromstring_fn) {
@@ -941,9 +840,9 @@
     return -1;   
   }
+  g_value_init(&values[0], G_TYPE_POINTER);
+  g_value_set_pointer(&values[0], NULL);
   g_value_init(value_box, G_TYPE_STRING);
-  g_value_init(values, G_TYPE_POINTER);
-  g_value_set_pointer(values, v);
+  g_value_set_static_string(value_box, value);
   g_value_init(&return_box, G_TYPE_INT);
-  g_value_set_static_string(value_box, value);
   g_closure_invoke(v->set_fromstring_fn, &return_box, 2, values, NULL);
   set_successfully = g_value_get_int(&return_box);
@@ -953,5 +852,5 @@
   }
   if (msg && (0 != set_successfully)) {
-    tostring = owl_variable_invoke_tostring(v, NULL);
+    tostring = owl_variable_get_tostring(v);
     if (tostring) {
       owl_function_makemsg("%s = '%s'", owl_variable_get_name(v), tostring);
@@ -964,54 +863,26 @@
   return set_successfully;
 }
-
-static int owl_variable_invoke_setter(owl_variable *v, const GValue *value) {
-  GValue values[] = {{0},{0}};
-  GValue return_box = {0};
-  int ret = -1;
-  g_value_init(&return_box, G_TYPE_INT);
-  g_value_init(values, G_TYPE_POINTER);
-  g_value_set_pointer(values, v);
-  g_value_init(values+1, G_VALUE_TYPE(value));
-  g_value_copy(value, values+1);
-  g_closure_invoke(v->set_fn, &return_box, 2, values, NULL);
-  ret = g_value_get_int(&return_box);
-  /*  g_value_unset(&return_box); */
-  g_value_unset(values+1);
-  return ret;
-}
  
 int owl_variable_set_string(owl_variable *v, const char *newval)
 {
-  int ret = -1;
-  GValue value_box = {0};
-  if (v->type != OWL_VARIABLE_STRING) return -1;
-  g_value_init(&value_box, G_TYPE_STRING);
-  g_value_set_static_string(&value_box, newval);
-  ret = owl_variable_invoke_setter(v, &value_box);
-  g_value_unset(&value_box);
-  return ret;
+  g_return_val_if_fail(v->type == OWL_VARIABLE_STRING, -1);
+
+  set_string_t cb = (set_string_t) v->set_fn;
+  return cb(v, newval);
 }
 
 int owl_variable_set_int(owl_variable *v, int newval)
 {
-  int ret = -1;
-  GValue value_box = {0};
-  if (v->type != OWL_VARIABLE_INT && v->type != OWL_VARIABLE_BOOL) return -1;
-  g_value_init(&value_box, G_TYPE_INT);
-  g_value_set_int(&value_box, newval);
-  ret = owl_variable_invoke_setter(v, &value_box);
-  /* g_value_unset(&value_box); */
-  return ret;
+  g_return_val_if_fail(v->type == OWL_VARIABLE_INT, -1);
+
+  set_int_t cb = (set_int_t) v->set_fn;
+  return cb(v, newval);
 }
 
 int owl_variable_set_bool(owl_variable *v, gboolean newval) {
-  int ret = -1;
-  GValue value_box = {0};
-  if (v->type != OWL_VARIABLE_BOOL) return -1;
-  g_value_init(&value_box, G_TYPE_BOOLEAN);
-  g_value_set_int(&value_box, newval);
-  ret = owl_variable_invoke_setter(v, &value_box);
-  /* g_value_unset(&value_box); */
-  return ret;
+  g_return_val_if_fail(v->type == OWL_VARIABLE_BOOL, -1);
+
+  set_bool_t cb = (set_bool_t) v->set_fn;
+  return cb(v, newval);
 }
 
@@ -1030,22 +901,24 @@
 CALLER_OWN char *owl_variable_get_tostring(const owl_variable *v)
 {
-  return owl_variable_invoke_tostring(v, NULL);
-}
-
-CALLER_OWN char *owl_variable_get_default_tostring(const owl_variable *v)
-{
+  GValue instance = G_VALUE_INIT;
+  GValue tostring_box = G_VALUE_INIT;
   char *ret = NULL;
-  GValue default_value_box = {0};
-  GValue variable_box = {0};
-  g_value_init(&variable_box, G_TYPE_POINTER);
-  g_value_init(&default_value_box, owl_variable_gtype_map[v->type]);
-  g_value_set_pointer(&variable_box, (gpointer)v);
-  g_closure_invoke(v->get_default_fn, &default_value_box, 1, 
-		   &variable_box, NULL);  
-  ret = owl_variable_invoke_tostring(v, &default_value_box);
-  g_value_unset(&default_value_box);
+
+  g_value_init(&instance, G_TYPE_POINTER);
+  g_value_set_pointer(&instance, NULL);
+  g_value_init(&tostring_box, G_TYPE_STRING);
+  g_closure_invoke(v->get_tostring_fn, &tostring_box, 1, &instance, NULL);
+
+  ret = g_value_dup_string(&tostring_box);
+  g_value_unset(&tostring_box);
+
   return ret;
 }
 
+const char *owl_variable_get_default_tostring(const owl_variable *v)
+{
+  return v->default_str;
+}
+
 owl_variable *owl_variable_get_var(const owl_vardict *d, const char *name)
 {
@@ -1053,54 +926,35 @@
 }
 
-const GValue *owl_variable_get(const owl_variable *v, GValue *val)
-{
-  GValue variable_box = {0};
-  g_value_init(&variable_box, G_TYPE_POINTER);
-  g_value_set_pointer(&variable_box,(gpointer)v);
-  g_closure_invoke(v->get_fn, val, 1, &variable_box, NULL);  
-  return val;
-}
-
 const char *owl_variable_get_string(const owl_variable *v)
 {
-  GValue value = {0};
-  if (owl_variable_get_type(v) != OWL_VARIABLE_STRING) {
-    owl_function_error("Variable '%s' is not a string.", owl_variable_get_name(v));
-    return NULL;
-  }
-  g_value_init(&value, G_TYPE_STRING);
-  /* not a leak, since we don't own the underlying string */
-  return g_value_get_string(owl_variable_get(v,&value));
+  g_return_val_if_fail(v->type == OWL_VARIABLE_STRING, NULL);
+
+  get_string_t cb = (get_string_t) v->get_fn;
+  return cb(v);
 }
 
 int owl_variable_get_int(const owl_variable *v)
 {
-  GValue value = {0};
-  if (owl_variable_get_type(v) != OWL_VARIABLE_INT) {
-    owl_function_error("Variable '%s' is an int.", owl_variable_get_name(v));
-    return -1;
-  }
-  g_value_init(&value, G_TYPE_INT);
-  return g_value_get_int(owl_variable_get(v,&value));
-}
-
-int owl_variable_get_bool(const owl_variable *v)
-{
-  GValue value = {0};
-  if (owl_variable_get_type(v) != OWL_VARIABLE_BOOL) {
-    owl_function_error("Variable '%s' is a boolean.", owl_variable_get_name(v));
-    return -1;
-  }
-  g_value_init(&value, G_TYPE_BOOLEAN);
-  return g_value_get_boolean(owl_variable_get(v,&value));
+  g_return_val_if_fail(v->type == OWL_VARIABLE_INT, 0);
+
+  get_int_t cb = (get_int_t) v->get_fn;
+  return cb(v);
+}
+
+gboolean owl_variable_get_bool(const owl_variable *v)
+{
+  g_return_val_if_fail(v->type == OWL_VARIABLE_BOOL, FALSE);
+
+  get_bool_t cb = (get_bool_t) v->get_fn;
+  return cb(v);
 }
 
 void owl_variable_describe(const owl_variable *v, owl_fmtext *fm)
 {
-  char *tostring = owl_variable_get_default_tostring(v);
+  const char *default_str = owl_variable_get_default_tostring(v);
   char *default_buf;
 
-  if (tostring)
-    default_buf = g_strdup_printf("'%s'", tostring);
+  if (default_str)
+    default_buf = g_strdup_printf("'%s'", default_str);
   else
     default_buf = g_strdup("<null>");
@@ -1109,9 +963,9 @@
                             owl_variable_get_summary(v), default_buf);
   g_free(default_buf);
-  g_free(tostring);
 }
 
 void owl_variable_get_help(const owl_variable *v, owl_fmtext *fm) {
   char *tostring;
+  const char *default_str;
 
   owl_fmtext_append_bold(fm, "OWL VARIABLE\n\n");
@@ -1128,9 +982,8 @@
   owl_fmtext_append_normal(fm, "\n\n");
 
-  tostring = owl_variable_get_default_tostring(v);
+  default_str = owl_variable_get_default_tostring(v);
   owl_fmtext_append_normal(fm, "Default:        ");
-  owl_fmtext_append_normal(fm, (tostring ? tostring : "<null>"));
+  owl_fmtext_append_normal(fm, (default_str ? default_str : "<null>"));
   owl_fmtext_append_normal(fm, "\n\n");
-  g_free(tostring);
 
   owl_fmtext_append_normal(fm, "Valid Settings: ");
@@ -1154,65 +1007,26 @@
 /* default common functions */
 
-const char *owl_variable_string_get_default(const owl_variable *v, void *dummy) {
+const char *owl_variable_string_get_default(const owl_variable *v) {
   return g_value_get_string(&(v->val));
 }
 
-const char *owl_variable_string_get_default_default(const owl_variable *v, void *dummy) {
-  return g_value_get_string(&(v->gval_default));
-}
-
-
-const int owl_variable_int_get_default(const owl_variable *v, void *dummy) {
+int owl_variable_int_get_default(const owl_variable *v) {
   return g_value_get_int(&(v->val));
 }
 
-const int owl_variable_int_get_default_default(const owl_variable *v, void *dummy) {
-  return g_value_get_int(&(v->gval_default));
-}
-
-
-const gboolean owl_variable_bool_get_default(const owl_variable *v, void *dummy) {
+gboolean owl_variable_bool_get_default(const owl_variable *v) {
   return g_value_get_boolean(&(v->val));
 }
 
-const gboolean owl_variable_bool_get_default_default(const owl_variable *v, void *dummy) {
-  return g_value_get_boolean(&(v->gval_default));
-}
-
-
-void owl_variable_delete_default(owl_variable *v, void *dummy)
-{
-  g_value_unset(&(v->val));
-}
-
 /* default functions for booleans */
 
-int owl_variable_bool_validate_default(const owl_variable *v, const gboolean newval, void *dummy) {
+int owl_variable_bool_validate_default(const owl_variable *v, gboolean newval) {
   return (newval == 1) || (newval == 0);
 }
 
-static int owl_variable_invoke_validator(owl_variable *v, const GValue *newval)
-{
-  GValue values[] = {{0},{0}};
-  GValue ret = {0};
-  g_value_init(&ret, G_TYPE_INT);
-  g_value_init(values, G_TYPE_POINTER);
-  g_value_set_pointer(values, v);
-  g_value_init(values+1, G_VALUE_TYPE(newval));
-  g_value_copy(newval, values+1);
-  g_closure_invoke(v->validate_fn, &ret, 2, values, NULL);
-  g_value_unset(values+1);
-  return g_value_get_int(&ret);
-}
-
-int owl_variable_bool_set_default(owl_variable *v, const bool newval, void *dummy) {
-  GValue value = {0};
-  g_value_init(&value, G_TYPE_BOOLEAN);
-  g_value_set_boolean(&value, newval);
-  if (v->validate_fn) {
-    if (!owl_variable_invoke_validator(v,&value)) {
-      return(-1);
-    }
-  }
+int owl_variable_bool_set_default(owl_variable *v, bool newval) {
+  if (!((validate_bool_t)v->validate_fn)(v, newval))
+    return -1;
+
   g_value_set_boolean(&(v->val), newval);
   return(0);
@@ -1221,19 +1035,18 @@
 int owl_variable_bool_set_fromstring_default(owl_variable *v, const char *newval, void *dummy) {
   gboolean i;
-  GValue value = {0};
   if (!strcmp(newval, "on")) {
-    i=1;
+    i = TRUE;
   } else if (!strcmp(newval, "off")) {
-    i=0;
+    i = FALSE;
   } else {
     return(-1);
   }
-  g_value_init(&value, G_TYPE_BOOLEAN);
-  g_value_set_boolean(&value, i);
-  return owl_variable_invoke_setter(v,&value);
-}
-
-CALLER_OWN char *owl_variable_bool_get_tostring_default(const owl_variable *v, const bool val, void *dummy)
-{
+
+  return owl_variable_set_bool(v, i);
+}
+
+CALLER_OWN char *owl_variable_bool_get_tostring_default(const owl_variable *v, void *dummy)
+{
+  bool val = owl_variable_get_bool(v);
   if (val == 0) {
     return g_strdup("off");
@@ -1247,18 +1060,13 @@
 /* default functions for integers */
 
-int owl_variable_int_validate_default(const owl_variable *v, const int newval, void *dummy)
+int owl_variable_int_validate_default(const owl_variable *v, int newval)
 {
   return (1);
 }
 
-int owl_variable_int_set_default(owl_variable *v, const int newval, void *dummy) {
-  GValue value = {0};
-  g_value_init(&value, G_TYPE_INT);
-  g_value_set_int(&value, newval);
-  if (v->validate_fn) {
-    if (!owl_variable_invoke_validator(v,&value)) {
-      return(-1);
-    }
-  }
+int owl_variable_int_set_default(owl_variable *v, int newval) {
+  if (!((validate_int_t)v->validate_fn)(v, newval))
+    return -1;
+
   g_value_set_int(&(v->val), newval);
   return(0);
@@ -1268,20 +1076,17 @@
   int i;
   char *ep;
-  GValue value = {0};
   i = strtol(newval, &ep, 10);
   if (*ep || ep==newval) return(-1);
-  g_value_init(&value, G_TYPE_INT);
-  g_value_set_int(&value, i);
-  return owl_variable_invoke_setter(v, &value);
-}
-
-CALLER_OWN char *owl_variable_int_get_tostring_default(const owl_variable *v, const int val, void *dummy)
-{
-  return g_strdup_printf("%d", val);
+  return owl_variable_set_int(v, i);
+}
+
+CALLER_OWN char *owl_variable_int_get_tostring_default(const owl_variable *v, void *dummy)
+{
+  return g_strdup_printf("%d", owl_variable_get_int(v));
 }
 
 /* default functions for enums (a variant of integers) */
 
-int owl_variable_enum_validate(const owl_variable *v, const int newval, void *dummy) {  
+int owl_variable_enum_validate(const owl_variable *v, int newval) {
   char **enums;
   int nenums, val;
@@ -1299,5 +1104,4 @@
   char **enums;
   int i, val=-1;
-  GValue box = {0};
   if (newval == NULL) return(-1);
   enums = g_strsplit_set(v->validsettings, ",", 0);
@@ -1309,10 +1113,8 @@
   g_strfreev(enums);
   if (val == -1) return(-1);
-  g_value_init(&box, G_TYPE_INT);
-  g_value_set_int(&box, val);
-  return owl_variable_invoke_setter(v, &box);
-}
-
-CALLER_OWN char *owl_variable_enum_get_tostring(const owl_variable *v, const int val, void *dummy)
+  return owl_variable_set_int(v, val);
+}
+
+CALLER_OWN char *owl_variable_enum_get_tostring(const owl_variable *v, void *dummy)
 {
   char **enums;
@@ -1322,5 +1124,5 @@
   enums = g_strsplit_set(v->validsettings, ",", 0);
   nenums = g_strv_length(enums);
-  i = val;
+  i = owl_variable_get_int(v);
   if (i<0 || i>=nenums) {
     g_strfreev(enums);
@@ -1334,20 +1136,13 @@
 /* default functions for stringeans */
 
-int owl_variable_string_validate_default(const struct _owl_variable *v, const char *newval, void *dummy) {
+int owl_variable_string_validate_default(const owl_variable *v, const char *newval) {
   if (newval == NULL) return(0);
   else return (1);
 }
 
-int owl_variable_string_set_default(owl_variable *v, const char *newval, void *dummy) {
-  GValue value = {0};
-  g_value_init(&value, G_TYPE_STRING);
-  g_value_set_static_string(&value, newval);
-  if (v->validate_fn) {
-    if (!owl_variable_invoke_validator(v,&value)) {
-      return(-1);
-    }
-  }
-
-  /* set_string dups the string for us */
+int owl_variable_string_set_default(owl_variable *v, const char *newval) {
+  if (!((validate_string_t)v->validate_fn)(v, newval))
+    return -1;
+
   g_value_set_string(&(v->val), newval);
   return(0);
@@ -1356,21 +1151,10 @@
 int owl_variable_string_set_fromstring_default(owl_variable *v, const char *newval, void *dummy) 
 {
-  GValue val = {0};
-  int ret = -1;
-  g_value_init(&val, G_TYPE_STRING);
-  /* we don't need to dup the string because we don't own it and the setter function we invoke will DTRT */
-  g_value_set_static_string(&val, newval);
-  ret = owl_variable_invoke_setter(v, &val);
-  g_value_unset(&val);
-  return ret;
-}
-
-CALLER_OWN char *owl_variable_string_get_tostring_default(const owl_variable *v, const char *val, void *dummy)
-{
-  if(val) {
-    return g_strdup(val);
-  } else {
-    return g_strdup("");
-  }
-}
-
+  return owl_variable_set_string(v, newval);
+}
+
+CALLER_OWN char *owl_variable_string_get_tostring_default(const owl_variable *v, void *dummy)
+{
+  return g_strdup(owl_variable_get_string(v));
+}
+
