Storing all the defined factory into a registry
Setting the factories into a factories hash instead of instance variable
so that it can be accessed easily
Now the define method returns the created group object
Merge pull request #6 from Codebrahma/registry

Registry