Moved logic out of SMSReceiverController