Enhanced application.php