Beginning of communications code.