Refactored AbstractPlugin.