Updated Module.php and added tests