Swapped flag from read to unread.  Seems more clear. Also fixed an issue in that same area. Extracted out the protocol from the connection md5 hash so that we can query messages based on protocol
Added error handling for connection problems