Added restarting and stopped flow control modes and debugging LEDs
Fixed thresholds. almost working