start adding a plugin system

the plugin system will be event based