Added support for tearing down the plugin