Stability improvements to Wifi version, including the addition of a Watchdog timer, see code for explanation and usage