Refactoring plugin structure