Refactor  plugin module.