Changed socket stuff for testing