Updated socket stuff