Finished a version of the code rebuildNet but not yet working-->saves a new version of the net, but the learning by casefile step seems to have failed