Added getAllMessages which returns all the messages as a list of strings