Rewrite of Tests, add new TCP test in roundtrip. Fix some little bugs