diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c
index 89e8d3382849e0f316b86f1989e39b1fbf9a1d59..0e837681a91300e2d386b616241a94b9135988c5 100644
--- a/pd/src/g_all_guis.c
+++ b/pd/src/g_all_guis.c
@@ -657,9 +657,7 @@ void scalehandle_bind(t_scalehandle *h) {
 // but in the case of canvas, the "iemgui" tag is added (it wasn't the case originally)
 void scalehandle_draw_select(t_scalehandle *h, int px, int py) {
     char tags[128]; // BNG may need up to 100 chars in 64-bit mode, for example
-    // casting x as t_object so that it can work both with t_glist (GOP scalehandles)
-    // and t_iemgui (iemgui scalehandles)
-    t_object *x = (t_object *)h->h_master;
+    t_object *x = h->h_master;
     t_canvas *canvas=glist_getcanvas(h->h_glist);
 
     //int px,py;
@@ -744,10 +742,10 @@ void scalehandle_draw(t_iemgui *x) {
     }
 }
 
-t_scalehandle *scalehandle_new(t_class *c, t_gobj *x, t_glist *glist, int scale) {
+t_scalehandle *scalehandle_new(t_class *c, t_object *x, t_glist *glist, int scale) {
     t_scalehandle *h = (t_scalehandle *)pd_new(c);
-    char buf[64];
-    h->h_master = (t_gobj*)x;
+    char buf[19]; // 3 + max size of %lx
+    h->h_master = x;
     h->h_glist = glist;
     sprintf(buf, "_h%lx", (t_int)h);
     pd_bind((t_pd *)h, h->h_bindsym = gensym(buf));
@@ -965,7 +963,7 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
     t_class *c = pd_class((t_pd *)x);
     if (c==my_numbox_class && ((t_my_numbox *)x)->x_hide_frame > 1) return; //sigh
 
-    if (!(old_sr_flags&4) && (!glist_isvisible(canvas) || !(canvas == x->x_glist))) {
+    if (!(old_sr_flags&4) && !glist_isvisible(canvas)) {
         return;
     }
     if (c==my_canvas_class) return;
diff --git a/pd/src/g_all_guis.h b/pd/src/g_all_guis.h
index 0844d7ea9c57d39c0a4481211ce6dc6027ac4eb7..88e993bdf9d695d89b97e0bfd711b915ede79031 100644
--- a/pd/src/g_all_guis.h
+++ b/pd/src/g_all_guis.h
@@ -37,33 +37,33 @@ typedef void (*t_iemfunptr)(void *x, t_glist *glist, int mode);
 typedef struct _scalehandle
 {
     t_pd       h_pd;
-    t_gobj    *h_master;
-    t_glist   *h_glist;
+    t_object  *h_master;
+    t_glist   *h_glist; // this is the canvas to draw on. Note that when objects are edited, "glist" and "canvas" mean the same.
     t_symbol  *h_bindsym;
-    int        h_scale;
-    char       h_pathname[64];
-    char       h_outlinetag[64];
-    int        h_dragon;
+    int        h_scale; // bool
+    char       h_pathname[37]; // max size for ".x%lx.h%lx" = 5+4*sizeof(long)
+    char       h_outlinetag[18]; // max size for "h%lx" = 2+2*sizeof(long)
+    int        h_dragon; // bool
     int        h_dragx;
     int        h_dragy;
-    int        h_offset_x;
-    int        h_offset_y;
-    int        h_vis;
+    int        h_offset_x; // unused. bring back their use for extra precision.
+    int        h_offset_y; // ditto.
+    int        h_vis; // bool
 } t_scalehandle;
 
 typedef struct _iemgui
 {
     t_object       x_obj;
     t_glist       *x_glist;
-    t_iemfunptr    x_draw;           //46    /* this should be static */
-    int            x_h;              //80
-    int            x_w;              //119
+    t_iemfunptr    x_draw;           //29    /* this should be static */
+    int            x_h; //unsigned   //80
+    int            x_w; //unsigned   //119
     int            x_ldx;            //33
     int            x_ldy;            //33
-    int            x_fontsize;       //49
-    int            x_fcol;           //35
-    int            x_bcol;           //41
-    int            x_lcol;           //21
+    int            x_fontsize;//uns. //41
+    int            x_fcol;//iemcolor //35  /* foreground */
+    int            x_bcol;//iemcolor //41  /* background */
+    int            x_lcol;//iemcolor //21  /* label */
     t_symbol      *x_snd;            //18  /* send symbol */
     t_symbol      *x_rcv;            //33  /* receive */
     t_symbol      *x_lab;            //15  /* label */
@@ -73,32 +73,30 @@ typedef struct _iemgui
     int            x_binbufindex;    //4   /* where in binbuf to find these (this should be static) */
     int            x_labelbindex;    //5   /* where in binbuf to find label (this should be static) */
     t_scalehandle *x_handle;         //24
-    t_scalehandle *x_lhandle;        //17
-    int            x_vis;            //64   /* is the object drawn? */
-    int            x_changed;        //30   /* has the value changed so that we need to do graphic update */
+    t_scalehandle *x_lhandle;        //19
+    int            x_vis;     //bool //64  /* is the object drawn? */
+    int            x_changed; //bool //30  /* has the value changed so that we need to do graphic update */
 
                                   // grep -w "$1" *.[ch]|wc -l
+    t_glist     *x_selected;      // 24 matches
     // from t_iem_fstyle_flags
     unsigned int x_font_style:6;  // 33 matches
-    t_glist     *x_selected;      // 15 matches
     unsigned int x_finemoved:1;   //  7 matches (sliders and [nbx] only)
     unsigned int x_put_in2out:1;  //  9 matches
     unsigned int x_change:1;      // 28 matches  // what's this and why is there also a x_changed ?
-    unsigned int dummy2:3;
     // from t_iem_init_symargs
     unsigned int x_loadinit:1;    // 21 matches
-    unsigned int dummy3:2;
     unsigned int x_locked:1;      //  7 matches ([bng] only)
     unsigned int x_reverse:1;     //  4 matches (sliders only)
-    unsigned int dummy:14;
+    unsigned int dummy:20;
 } t_iemgui;
 
 typedef struct _bng
 {
     t_iemgui x_gui;
-    int      x_flashed;
-    int      x_flashtime_break;
-    int      x_flashtime_hold;
+    int      x_flashed; // bool
+    int      x_flashtime_break; // >= 0
+    int      x_flashtime_hold; // >= 0
     t_clock  *x_clock_hld;
     t_clock  *x_clock_brk;
     t_clock  *x_clock_lck;
@@ -110,27 +108,27 @@ typedef struct _slider
     int      x_pos;
     int      x_val;
     int      x_center; // is this necessary ?
-    int      x_thick;
-    int      x_lin0_log1;
-    int      x_steady;
+    int      x_thick; // bool
+    int      x_lin0_log1; // bool
+    int      x_steady; // bool
     double   x_min;
     double   x_max;
     double   x_k;
     double   x_last;
-    int      x_is_last_float;
-    int      x_orient; // 0=horiz, 1=vert
+    int      x_is_last_float; // bool
+    int      x_orient; // bool: 0=horizontal ([hsl]), 1=vertical ([vsl])
 } t_slider;
 
 typedef struct _radio
 {
     t_iemgui x_gui;
-    int      x_on;
+    int      x_on; // unsigned < x_number
     int      x_on_old; /* for use by [hdl] [vdl] */
-    int      x_change;
-    int      x_number;
-    int      x_drawn;
-    t_atom   x_at[2];
-    int      x_orient; // 0=horiz, 1=vert
+    int      x_change; // bool
+    int      x_number; // unsigned > 0
+    int      x_drawn; // unsigned < x_number
+    t_atom   x_at[2]; // tmp buffer for outlet_list
+    int      x_orient; // bool: 0=horiz, 1=vert
 } t_radio;
 
 typedef struct _toggle
@@ -143,22 +141,22 @@ typedef struct _toggle
 typedef struct _my_canvas
 {
     t_iemgui x_gui;
-    t_atom   x_at[3];
-    int      x_vis_w;
-    int      x_vis_h;
+    t_atom   x_at[2]; // tmp buffer for outlet_list
+    int      x_vis_w; // unsigned
+    int      x_vis_h; // unsigned
 } t_my_canvas;
 
 typedef struct _vu
 {
     t_iemgui x_gui;
-    int      x_led_size;
-    int      x_peak;
-    int      x_rms;
-    t_float  x_fp;
-    t_float  x_fr;
-    int      x_scale;
-    void     *x_out_rms;
-    void     *x_out_peak;
+    int      x_led_size; // unsigned
+    int      x_peak; // 1..40 if visible ; 0 if invisible
+    int      x_rms;  // 1..40 if visible ; 0 if invisible
+    t_float  x_fp; // value for outlet 1
+    t_float  x_fr; // value for outlet 0
+    int      x_scale; // bool
+    t_outlet *x_out_rms; // outlet 0
+    t_outlet *x_out_peak; // outlet 1
     unsigned int x_updaterms:1;
     unsigned int x_updatepeak:1;
 } t_vu;
@@ -172,12 +170,12 @@ typedef struct _my_numbox
     double   x_min;
     double   x_max;
     double   x_k;
-    int      x_lin0_log1;
+    int      x_lin0_log1; // bool
     char     x_buf[IEMGUI_MAX_NUM_LEN];
-    int      x_numwidth;
-    int      x_scalewidth;  /* temporary value when resizing */
-    int      x_scaleheight; /* temporary value when resizing */
-    int      x_tmpfontsize; /* temporary value when resizing */
+    int      x_numwidth; // unsigned
+    int      x_scalewidth;  /* temporary value for scalehandle */
+    int      x_scaleheight; /* temporary value for scalehandle */
+    int      x_tmpfontsize; /* temporary value for scalehandle */
     int      x_log_height;
     int      x_hide_frame;  /* 0 default, 1 just arrow, 2, just frame, 3 both */
 } t_my_numbox;
@@ -226,7 +224,7 @@ EXTERN void scalehandle_draw_select2(t_iemgui *x);
 EXTERN void scalehandle_draw_erase(t_scalehandle *h);
 EXTERN void scalehandle_draw_erase2(t_iemgui *x);
 EXTERN void scalehandle_draw(t_iemgui *x);
-EXTERN t_scalehandle *scalehandle_new(t_class *c, t_gobj *x, t_glist *glist, int scale);
+EXTERN t_scalehandle *scalehandle_new(t_class *c, t_object *x, t_glist *glist, int scale);
 EXTERN void scalehandle_free(t_scalehandle *h);
 EXTERN void properties_set_field_int(long props, const char *gui_field, int value);
 EXTERN void scalehandle_dragon_label(t_scalehandle *h, float f1, float f2);
diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c
index a12d4ef4679df01fcfc995086eb5ccbb5925ab01..1f1794abab79ecac6d3c5dfbb97a659177a3e390 100644
--- a/pd/src/g_bang.c
+++ b/pd/src/g_bang.c
@@ -368,8 +368,8 @@ static void *bng_new(t_symbol *s, int argc, t_atom *argv)
     x->x_clock_lck = clock_new(x, (t_method)bng_tick_lck);
     outlet_new(&x->x_gui.x_obj, &s_bang);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
     x->x_gui.x_changed = 0;
 
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index 189ce75f401969a69aecdeb51b9cc1ae34ca7084..06ed032cd3da13e4e7f0e8f15c33b8054bb5d0bc 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -441,8 +441,8 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
     pd_pushsym(&x->gl_pd);
 
     //dpsaha@vt.edu gop resize (refactored by mathieu)
-    x-> x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x,1);
-    x->x_mhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x,0);
+    x-> x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x,1);
+    x->x_mhandle = scalehandle_new(scalehandle_class,(t_object *)x,x,0);
 
     x->u_queue = canvas_undo_init(x);
     return(x);
diff --git a/pd/src/g_mycanvas.c b/pd/src/g_mycanvas.c
index 675851b7d03d5d9bf97d07712771e1b3b89895b4..0df56ee5333f29d14f40951017d4de895e2ce508 100644
--- a/pd/src/g_mycanvas.c
+++ b/pd/src/g_mycanvas.c
@@ -320,8 +320,8 @@ static void *my_canvas_new(t_symbol *s, int argc, t_atom *argv)
     x->x_at[1].a_type = A_FLOAT;
     iemgui_verify_snd_ne_rcv(&x->x_gui);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
 
     return (x);
diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c
index d69ef2f4ab609e27554f94207d2d5d74a21e1697..53fe8475c7f834fe7bc1e94a139adfc20a5e8e1f 100644
--- a/pd/src/g_numbox.c
+++ b/pd/src/g_numbox.c
@@ -759,8 +759,8 @@ static void *my_numbox_new(t_symbol *s, int argc, t_atom *argv)
     x->x_gui.x_change = 0;
     outlet_new(&x->x_gui.x_obj, &s_float);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_scalewidth = 0;
     x->x_scaleheight = 0;
     x->x_tmpfontsize = 0;
diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c
index 1e86ef05922372e1e964b7a620f4eee28e2c23e2..ccb35966fd5f9bd31d92d6dc682959d847a7d7c8 100644
--- a/pd/src/g_radio.c
+++ b/pd/src/g_radio.c
@@ -460,8 +460,8 @@ static void *radio_new(t_symbol *s, int argc, t_atom *argv)
     iemgui_all_colfromload(&x->x_gui, bflcol);
     outlet_new(&x->x_gui.x_obj, &s_list);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
 
     return (x);
diff --git a/pd/src/g_slider.c b/pd/src/g_slider.c
index e2fcf4b51a2420683e7998136e7391235a8649a1..59ee162042ce0d68e3a58fff167dfffa3dfaadc3 100644
--- a/pd/src/g_slider.c
+++ b/pd/src/g_slider.c
@@ -533,8 +533,8 @@ static void *slider_new(t_symbol *s, int argc, t_atom *argv)
     iemgui_verify_snd_ne_rcv(&x->x_gui);
     outlet_new(&x->x_gui.x_obj, &s_float);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
     x->x_gui.x_changed = 0;
 
diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c
index df56efc04bf4be2c98ae8db64f4982ded46ca7a5..13303d63f155224f31914748b6194f397b90454b 100644
--- a/pd/src/g_toggle.c
+++ b/pd/src/g_toggle.c
@@ -318,8 +318,8 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
     iemgui_verify_snd_ne_rcv(&x->x_gui);
     outlet_new(&x->x_gui.x_obj, &s_float);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
     x->x_gui.x_changed = 1;
 
diff --git a/pd/src/g_vumeter.c b/pd/src/g_vumeter.c
index fcff0cc0c565e439dd9f263cf122eb51622633e6..c72273adac149fd8b2834d64772cf1de4d6a1c4f 100644
--- a/pd/src/g_vumeter.c
+++ b/pd/src/g_vumeter.c
@@ -616,8 +616,8 @@ static void *vu_new(t_symbol *s, int argc, t_atom *argv)
     x->x_out_rms = outlet_new(&x->x_gui.x_obj, &s_float);
     x->x_out_peak = outlet_new(&x->x_gui.x_obj, &s_float);
 
-    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,1);
-    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_gobj *)x,x->x_gui.x_glist,0);
+    x->x_gui. x_handle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,1);
+    x->x_gui.x_lhandle = scalehandle_new(scalehandle_class,(t_object *)x,x->x_gui.x_glist,0);
     x->x_gui.x_obj.te_iemgui = 1;
 
     return (x);