edits from in-person review; fixes for tcp w.r.t. closing error codes