Adding Message Related functionality

This is first draft.