Update to new Plugin API