Added new demo of NN, added a few utility functions