Implemented 'upgrade' in command-line client