Bug 1066264 - Refactor update.py

(See bug)