Basic neural network with backpropagation (not vectorized)