DB stuff and Twilio logic