XD-357 Creating a base class for Plugins

Updated the plugins to use base class and did some code cleanup.