Rewrote bootstrap.sh to be less spaghetti-like