Change onevent handling
Add jsonvalidator and update plugins to use it