Improved update script