Refactor bootstrap script.