Refactor to named case classes

This changes the generic Array classes to specific named objects
to help avoid the confusing of passing around the type of objects
used for different things.
Add error calculation to Neuron