Refactored some of checkForUpdates() into smaller methods