Refactor plugins because plugman will create the module wrapping code