clean up code in default.php