Made NN scripts more efficient