Change pluginConfig to instance method.

Move common functions to base class. PluginBase.