Filled in MSG system

Messaging system, probably will need plenty of study later on, but for
now, it's just stuck in there, along with lots of other code needed for
it.