Minor refactor of update script