added code in main.c to test neural network functions. fixed bug where nnet_destroy() gets stuck in an infinite loop.