Remove unused messages from message map