Clean up tcp client API