RG-311 cleanup/refactoring of watchdog