Updated exceptions
Created classes (instead of typedefs) for neuron and weight matrix