Improved the update script