Changed the scope of a few functions and added a currently useless watchdog file