Small changes at sms query and add tablet detection.