Some stuff for the plugin api