Improved update script.