Changed to a different matrix library, because the previous one was causing memory leaks. Additionaly added comments fot the neural network.