Refactor PluginManager usage (use IPluginManager instead).