Level + UpgradeState

Added support for levels.