Add neural network, add some tests, fix things