More work on DeepLearning

Also added a UnitTest.