Revert "Fixes for SMS Middleware"

This reverts commit d442d8027737f615293161f95647ba7fdbb465d9.