Otmessage refactor part4

continue #325
Thsi is the last set of commits.