Move death ray code out of main.
Rename communications loop.