Oh yes you right. It's a remnant of the old way I created the plugin before I found the api.add_plugin.
Thanks