remove an unneeded socket check and commented out code