Structure and function in the nervous systems of invertebrates