Refactoring AbstractPlugin