Update the plugin to new API