Clean up code and fix watchdog