refactor: move UpgradeToCommand to its own module.