Move some code from index.php to bootstrap.php for using it in testing instead of run full app in index.php.