small refractor of module class