Remove all middleware hook.
Add a middleware exists function.
Trigger events when plugins are added and removed.