plugin massive refactoring