Refactor bootstrap.php