sms sent and delivery tracking implemented; major refactoring