Modularize communications code.