refactor and test Neuron module