Converted to plugin framework. Added public destroy method.