Cleaning up some variable names; Adding the easy parts of the stats function.