Refactoring Module.php