Cleaned up code in sendSMS.