Split example program into listener and talker