Define functions to produce node vectors, a node-index map, weight matrix.

i.e. defined/revised node-vec, node-index-map, new-activn-vec, new-wt-mat.
Also moved some older things around in file.