removed unused socket variables and renamed files