more work cleaning up socket comm