Moved the nodes, weights inside the h_of_p function, instead of int_w_B.  The speedup wasn't much though, probably because that's not the bottleneck