Updated to reflect changes in Spytext. Lots of logic removed.