Complete plugin-style refactoring