Add watchdog function to BeagleBone. Did some additional cleanup.