singleton implemented

singleton and singleton test (html file, not nice but shows working)
Hi @nullorvoid ! Thank you for your contribution to this repo.

I'm a little confused about _drawMethods and _drawMethodsLen: shouldn't they be declared as objects instead of arrays? The "group" key is a string right?

Of course, an array being also an object, the current code is functional, but if there is no specific reason of doing this I think it's better to declare these as objects.