Add UpgradeManager. Closes #274.