Update to new plugin architecture