Move randWt() to network.c