Intial nnetdemo code.