Refactored update checking to use the same code.