What acts as a pathway for impulses to and from the brain and the nerves that go to the muscles and some organs?