Initial code for auto-upgrader