Commented code and added in Watchdog timer functionality (Written by
Thinh Le)