Upgrade main class