some cleanup of unused socket variables