Minor cleanup of recv code