Refactored plugins: added DI, init cycle.