Extracted permissions and economy to plugin class