Added code for plugins.