The first is the medulla, which is actually an extension of the spinal cord into the skull. Besides containing tracts up and down to and from the higher portions of the brain, the medulla also contains some of the essential nuclei that govern respiration and heart rate. The upper part of the medulla contains a pinky-sized complex of nuclei called the reticular formation. It is the regulatory system for sleep, waking, and alertness