templatize the plugin manager