Refactoring of default.php