Further refactoring. Added Upgrades.