agree, i've been thinking about how to make this function read nicer, and i think doing what you described as well as moving these sms handlers each into their own module would be a nice way to organize things and increase readability.