Creating the collapse/expand feature on the messages