Made dependency registry and instance and improved plugin support