Fixes to plugin architecture
Fixes to plugin architecture