Change the registry from shared module global to user created instance
2.0.0
Make things backward compatible with 1.x
2.0.1
Fix undefined error
2.0.2