Simplify main message processing function

This improves the calling semantics and debug logging, all information is
contained in the message.  It also makes the main function usable for
different scenarios which currently tap directly into and repeat lower-level
logic.

Change-Id: I0a02bc94ba17b32f0e5a22015d0efb416f4fe26e
Merge "Simplify main message processing function"