Move neural network into separate class