Removing upgrade code