Simplified registry.add definition

Wow, I can't believe that I didn't know that you could just define a function
inside a plain object and this would be properly bound to it. It is how I have
always though JS should work, but unfortunately it doesn't seem to fix many of
my other issues with JavaScript's object model. Sure makes this one nicer
though.