Refactoring update script