Added script functions to the plugin API