Refactoring of SmsGateway