singleton implemented

singleton and singleton test (html file, not nice but shows working)
Hi,
You are right the removeDrawMethods doesn't do what it's supposed to.  I need to delete with the keys from both rather than setting them to 0, will fix with delete _drawMethods[group]; delete _drawMethodsLen[group].  

As you pointed out the code above would remove them but leave an empty array, for removeAllDrawMethods I can change it again to the delete code which would delete the object.