Minor refactorings for update check