Implemented event model for plugins;
Refactoring;
Fixes;