The central nervous system consists of the brain and spinal cord. It receives sensory input and directs motor neuron activity and homeostasis. During embryonic development, the neural tube forms and eventually becomes the CNS. The brain develops from the forebrain, midbrain and hindbrain. The cerebrum is the largest part of the brain and is responsible for higher mental functions. Key areas of the cerebral cortex include the frontal, parietal, temporal and occipital lobes. The central nervous system also includes structures like the basal ganglia, thalamus, hypothalamus and pituitary gland that are involved in functions like emotion, memory, language and homeostasis.