refactor neuron and cortex