Working, but still having problems with pipes and dead processes
Fixed watchdog problem
Cleaner code