Prepare code for TCP connections, tests are passing again