Inserted methodes renderMessage and renderMessages.