Updated upgrading system

Renamed UpgradeClock to RepaintingClock, changed some implementations
Fixed conflicts