This is the most recent known good state of the script, branching now in case of snafus.