Fairly extensive change to work with new TI CC3000 on an AdaFruit shield as a Wifi option. Seems quite stable after a fairly few days of tweaking and experimenting.