Add category and categories code for plugin events to the classes