Clean up

Assorted clean ups in update.py and ENCODETools.py