nice, that's a huge improvement! laugh

what i still would change is this:

testPanel = PANEL.pan_create(null, 0);
testPanel = new Panel(null, 0);

but that's a rather small thing...

edit:
and for the method names i would leave away the prefixes like pan_.