More refactoring for basic working TCPProxy.