Refactor at the watchdog