Fixes some bugs in the neural network implementation.  Networks for AND and OR can be correctly trained, but XOR still doesn't work.