refactored update script blob -> functions

because it grew enough to need an actual structure.  Adding and changing
things should be much easier now.