Fixing nnet averaging bug; plus cleanup