Factored out plugin loading behavior into plugin_loader.js