Refactored plugins classes slightly