Code cleanup and `--upgrade` removal.