The nervous system is highly complex and coordinates actions and sensory information between parts of the body. It detects environmental changes and works with the endocrine system to respond. The central nervous system includes the brain and spinal cord. The brain contains structures that control consciousness, movement, senses, emotions, and autonomic functions. Neurons communicate via electrical and chemical signals. The peripheral nervous system connects the central nervous system to the rest of the body and contains the somatic and autonomic systems. The autonomic system regulates involuntary functions.