Tidying up the update script