Optimized plugin/polyfill inner classes and events