Refactoring Modules.php files