Refactoring moure modul factorial