Refactor SMS gateway to use components.