Restructure the update.py.