Refactored check_for_new_messages to use app_info.