Implemented addMessage method in Common class.