Rilmodem SMS code re-factor