Added watchdog timer. Untested.