Modifying structure to support different messaging types.
Merge msgtype branch. The bot now supports sending different types of
messages.