Upgrade support and code merge