Changed 'send' and 'recv' to use 'STM' instead of 'IO'