Scripts for mean and stdev calculation, columnating random function ttests

Improvements to the randfunc scripts so that more variables are at the top of
the file.