Complete refactoring of Plugin and PluginEngine.