Small refactoring of MessagesWidget logic - added some Exceptions etc.