The respiratory system is divided into the upper and lower respiratory tracts. The upper respiratory tract includes organs outside the thoracic cavity like the oral cavity, nose, and larynx. The lower respiratory tract includes organs inside the thoracic cavity like the trachea, bronchi, and lungs. Accessory organs that support the respiratory system include the nose, pharynx, and larynx. The main functions of the respiratory system are to allow for gas exchange through breathing and to warm, humidify, and filter air before it reaches the lungs. Common diseases of the respiratory system result from inflammation and infection of the upper and lower airways.