Restructuring source and adding C++ and Python versions of the neural network.