Move message processing to new 'procmsg' module.

Compiles and passes tests.  Could use some refinement.
Misses license header!