fixing bugs in messaging system. WIP.
continuing to fix messaging
fixed all bugs in messaging system
removed debugging code
Merge pull request #94 from rwarbelow/touch_ups

Touch-ups to messaging system