Updated to support the new Plugin API