Pass extra flags to plugins, use plugin instances instead of static calls