refactoring in TcpConnection actors