Talmud, Mishna and Midrash
Question
Some authors claim that the Torah, the Mishnah, the Talmud, and the Midrashim are separate documents. Other authors claim that the Talmud consists of the Mishnah and the Gemarah. Some authors claim that the Talmud includes Midrashim, others claim that the Midrashim are separate from the Talmud. Is the Mishnah separate from the Talmud? Does the Talmud contain some Midrashim? I understand that some Commentary on the Talmud, written centuries after the Talmud was written may include Midrashim; however, my questions relates to the Talmud itself, not the Commentaries.