Refactor bootstrap.