Fix some bootstrap settings. Add vars to allow scripts to determine the environment they're running in.