TCP server supports switching relais and multiple connections
Better error checking
Add test routine
Removed debug