Reimplented NeuralNet.cpp as a class