restructure the upgrade shell to be task based

one task per operation, and the logic will now be looping on files and
doing all operations at once on a file - instead of all operations doing
whatever they like, resulting in searching for and looping on files
multiple times