Refactored some parts of twilio; added testing tools